Skip to content

Instantly share code, notes, and snippets.

View armandfardeau's full-sized avatar
🏠
Working from home

Armand Fardeau armandfardeau

🏠
Working from home
  • Paris, France
View GitHub Profile
@koppen
koppen / pre-commit
Created January 25, 2016 08:50
Run rubocop on pre-commit
# .git/hook/pre-commit
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
@aras-p
aras-p / preprocessor_fun.h
Last active March 5, 2026 23:36
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@ryo1kato
ryo1kato / gist:831171
Created February 17, 2011 06:45
mkcdir
mkcdir(){
mkdir "$@"
if [ "$1" = "-p" ]; then
cd "$2"
else
cd "$1"
fi
}