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
# User specific aliases and functions | |
# @VAR | |
KUBE_NS_PREPROD="preprodns" | |
KUBE_NS_DEV="devns" | |
KUBE_NS_PROD="prodns" | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |
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
<?php | |
function rmdir_r ($d) | |
{ | |
if (is_dir ($d)) { | |
$list = scandir ($d); | |
foreach ($list as $object) { | |
if ($element != '.' && $element != '..') { | |
if (is_dir ($d . '/' . $element)) { | |
rmdir_r ($d . '/' . $element); |
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 | |
XGETTEXT=/usr/bin/xgettext | |
XMESGMERG=/usr/bin/msgmerge | |
DOMAIN="messages.po" | |
TEMPLATE="messages.pot" | |
if [ ! -e "$1" ]; then | |
touch $1 |
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
""""""""""""""""""""""""""""""""""""" | |
" GENERAL | |
""""""""""""""""""""""""""""""""""""" | |
set nocompatible | |
set history=500 | |
" undo, pour revenir en arrière | |
set undolevels=150 | |
" vim monitor realtime changes to a file |
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 | |
DOMAIN_NAME=$1 | |
MAIL=$2 | |
if [ "x$2" = "x" ]; then | |
echo "Usage: $0 domain-name.ltd email-adress"; | |
echo "Example: $0 example.com [email protected]" | |
exit; | |
fi |
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 | |
BIN_DIR="/usr/bin" | |
DOWNLOAD_SCRIPTS=( | |
"https://phar.phpunit.de/phpcpd.phar" | |
"https://phar.phpunit.de/phpunit.phar" | |
"https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar" | |
"http://phpdox.de/releases/phpdox.phar" | |
"http://static.pdepend.org/php/latest/pdepend.phar" |
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
[user] | |
name = Laurent Guédon | |
email = [email protected] | |
[alias] | |
amend = commit --amend | |
st = status | |
df = diff | |
co = checkout | |
ci = commit |
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 | |
mkdir .config && cd .config | |
git clone https://gist.github.com/5765391.git bashrc | |
echo -e "\nsource `pwd`/bashrc/bashrc\n" >> ~/.bashrc | |
cd .. | |
git clone https://gist.github.com/d2b6ccc2c5bb3dd0fdbc.git vimrc | |
ln -sf ~/.config/vimrc ~/.vimrc |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
if (req.http.host ~ "^cdn\.myapiservice\.com") { | |
set req.http.host = "api.myapiservice.com"; | |
set req.url = regsub(req.url, "^/", "/v1/images/"); | |
} |
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
s3cmd modify --add-header='Cache-Control: max-age=2419200, must-revalidate' s3://BUCKET/dir/path --recursive |
OlderNewer