This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put all _* files into ~/.zsh/completion/ | |
j() { | |
mkdir -p ~/dotfiles/shell_bookmarks | |
if [ ! "$1" ] | |
then | |
echo "give me an alias as argument" | |
return | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[restart_service] | |
name = "Restart service" | |
command = "echo pouet $YNH_ACTION_SERVICE" | |
user = "root" # optional | |
cwd = "/" # optional | |
accepted_return_codes = [0, 1, 2, 3] # optional | |
description = "a dummy stupid exemple or restarting a service" | |
[restart_service.arguments] | |
[restart_service.arguments.service] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables="\ | |
YNH_CONFIG_FIRST_TAB_SECOND_SECTION_FIRST_OPTION | |
YNH_CONFIG_SECOND_TAB_POUET_FIRST_OPTION | |
YNH_CONFIG_SECOND_TAB_PASSWOWORD_FIRST_OPTION | |
YNH_CONFIG_SECOND_TAB_POUET_SECOND_OPTION | |
YNH_CONFIG_FIRST_TAB_FIRST_SECTION_FIRST_OPTION | |
YNH_CONFIG_FIRST_TAB_FIRST_SECTION_SECOND_OPTION\ | |
" | |
config_path=/etc/yunohost/apps/${YNH_APP_ID}/stupid_config/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
outdated_dependencies=$(pip list -o) | |
number_of_lines="$(echo -e "$outdated_dependencies" | grep "." | wc -l)" | |
if (( $number_of_lines > 0 )) | |
then | |
echo -e "$outdated_dependencies" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[revsetalias] | |
l = (parents(not public()) or not public() or . or head()) and (not obsolete()^) and not closed() | |
[templates] | |
l =\ | |
{pad(label("commit.rev", rev), 5, " ", True)} \ | |
{label("commit.hash", node|short)} \ | |
{pad(label("changeset.{phase}", phase), 8)} \ | |
{label("commit.date", pad(date|age, 15))}\ | |
{label("commit.branch.{ifeq(branch, "default", "default", "other")}", pad(branch, 10))}\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import gimpfu | |
from gimpfu import pdb | |
def stickerify_bordure(image, tdrawable): | |
def duplicate_layer(): | |
copy = current_layer.copy() | |
image.add_layer(copy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
possible_sizes() { | |
local video_path=$1 | |
if [ ! "$video_path" ] | |
then | |
echo "Usage: possible_size video_path" | |
return | |
fi | |
local width=$(mediainfo $1 | grep Width | cut -d ":" -f 2 | sed 's/[^0-9]//g') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BIN_PATH=ve/bin/git-of-theseus-analyze | |
if [ ! "$1" ] | |
then | |
echo "Usage: bash analyze.sh repos_list_file" | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def brol(fail=False): | |
try: | |
print "in try" | |
if fail: | |
raise Exception() | |
return "try" | |
except: | |
print "in exception" | |
return "exception" | |
finally: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import dbus | |
service = sys.argv[1] | |
d = dbus.SystemBus() | |
systemd = d.get_object('org.freedesktop.systemd1','/org/freedesktop/systemd1') | |
manager = dbus.Interface(systemd, 'org.freedesktop.systemd1.Manager') |
NewerOlder