This file contains 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 | |
output=$(curl -s --fail -w "%{http_code}" -u '<user>:<password>' -XGET "https://www.ovh.com/nic/update?system=dyndns&hostname=<hostname>&myip=$(curl -s https://ipinfo.io/ip)") ; [[ $? -eq 0 ]] && (echo $output | grep -Fq 'nochg') || echo $output |
This file contains 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
APP_ENV=test |
This file contains 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 connection data accordingly | |
source_host=xxx | |
source_port=6379 | |
target_host=localhost | |
target_port=6379 | |
#copy all keys without preserving ttl! | |
redis-cli -h $source_host -p $source_port keys \* | while read key; do |
This file contains 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
ssh -q -o ConnectTimeout=4 -oBatchMode=yes $host exit && echo Connexion successful $host |
This file contains 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
^(?!.*STRING1|.*STRING2|.*STRING3).*$ |
This file contains 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
# Better zsh git prompt with zsh-git-prompt | |
# Add it to your .zshrc after the plugins(... zsh-git-prompt ...) line | |
# First, it rewrites git prompt style | |
# Then overrides git_super_status() | |
# And overrides build_prompt() from agnoster (depends of what you want) | |
ZSH_THEME_GIT_PROMPT_PREFIX="" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
ZSH_THEME_GIT_PROMPT_SEPARATOR=" " | |
ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg[black]%}" |
This file contains 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
<!-- Volume definitions --> | |
<volume user="fab" fstype="fuse" path="encfs#/home/fab/.Secure.encfs" mountpoint="/home/fab/.Secure" /> | |
<!-- pam_mount parameters: General tunables --> |
This file contains 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
setfacl -R -d -m g::rwx . | |
# will set newly created files and folders ...rwx...+ :) |
This file contains 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 | |
VIDEO="vlc" | |
echo "Which stream?" | |
read stream | |
starting_video_proc_count=`ps aux | grep -v grep | grep $VIDEO | wc -l` | |
nohup livestreamer twitch.tv/$stream best &>/dev/null & export LIVESTREAMER_ID=$! |
This file contains 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
code: | |
image: debian:jessie | |
volumes: | |
- .:/var/www/html | |
mysql: | |
image: mysql | |
environment: | |
MYSQL_DATABASE: root | |
MYSQL_ROOT_PASSWORD: root |
NewerOlder