I hereby claim:
- I am akarzim on github.
- I am akarzim (https://keybase.io/akarzim) on keybase.
- I have a public key ASD_kvOPf8DwAJ3kMZ2viboTc9bqLfdB6gVMqXtsX_aY6wo
To claim this, I am signing this object:
#!/bin/sh | |
# Source du backup | |
SRC="/home/akarzim/Documents" | |
# Destination du backup | |
DST="/media/SDBackup" | |
UUID="/dev/disk/by-uuid/02e610cf-1cda-4891-b6f5-486d216a4d39" | |
# Date de la forme année-mois-jour-timestamp | |
# (le timestamp %s sert si on veut faire plusieurs sauvegardes dans la même journée) | |
DATE=`date +%Y-%m-%d-%s` |
# https://github.com/TwP/logging/ | |
# Temporarily log with or without backtrace | |
# | |
# Usage: | |
# require 'logging' | |
# logger = Logging.logger(STDOUT) | |
# logger.with_backtrace do | |
# logger.error StandardError.new('oups!') | |
# end | |
# |
I hereby claim:
To claim this, I am signing this object:
# | |
# Set key binding to extend aliases. | |
# | |
# Authors: | |
# François Vantomme <akarzim@gmail.com> | |
# | |
# Return if requirements are not found. | |
if [[ "$TERM" == 'dumb' ]]; then | |
return 1 |
# The options are: | |
# --color dark - use a colour scheme | |
# -rr - read-only mode (prevents delete and spawn shell) | |
# --exclude ignore directories I won't do anything about | |
alias du='ncdu --color dark -rr -x --exclude .git --exclude node_modules' |
function brip { | |
sudo /sbin/route -n add -net 192.168.0.0/16 -gateway $(docker-machine ip) | |
sudo /sbin/route -n add -net 172.19.0.0/12 -gateway $(docker-machine ip) | |
interface=$(ifconfig bridge100 | grep member | cut -d ' ' -f 2) | |
sudo ifconfig bridge100 -hostfilter "$interface" | |
} |
function dkmee { | |
# Restart manually NFS (why NFS v3?) due to a bug on docker-machine start | |
docker-machine ssh local -t sudo mount -v -t nfs -o nfsvers=3 $(docker-machine ip):/Users /Users/ | |
# Set config for ES | |
docker-machine ssh local -t sudo sysctl -w vm.max_map_count=362144 | |
# Update iptables to access container from localhost without expose host port | |
# https://docs.docker.com/v17.09/engine/userguide/networking/default_network/container-communication/#container-communication-between-hosts | |
docker-machine ssh local -t sudo iptables -P FORWARD ACCEPT | |
} |
# | |
# Aliases | |
# | |
# Run Rubocop through Bundler | |
if (( $+commands[bundle] )); then | |
alias rbbr='bundle exec rubocop' | |
fi | |
# Run Middleman through Bundler |
# | |
# Aliases | |
# | |
# Edit README.md in Vim | |
if (( $+commands[vi] )); then | |
alias vir='vi README.md' | |
fi | |
# Show README.md in terminal |