Configurer le fichier ssh
$ cat ~/.ssh/config
Host pi
Hostname 5.50.77.180
Port 2812
User pi
IdentityFile ~/.ssh/raspberry.id_rsa
<?php | |
class LeLogDuRoumain{ | |
private $f; | |
function __construct($f='~/Desktop/le_log_du_roumain.txt'){$this->f=$f;} | |
function log($data){file_put_contents($this->f,date('h:i:s').' '.$data.PHP_EOL,FILE_APPEND);} | |
} |
# Change PS1 display | |
function parse_git_branch() | |
{ | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# arousseau ~/www (feature/5651) $ | |
PS1="\[\e[1;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\]\[\033[31m\]\$(parse_git_branch)\[\033[00m\] \$ " | |
# ~/www (feature/5651) $ | |
PS1="\[\e[1;34m\]\w\[\e[m\]\[\033[31m\]\$(parse_git_branch)\[\033[00m\] \$ " |
#!/bin/bash | |
# colors | |
green='\e[0;32m' | |
darkred='\e[1;31m' | |
lightblue='\e[1;34m' | |
defaut='\033[0m' | |
# importants variables | |
today=$(date +%Y-%m-%d) |
Host pi | |
Hostname 168.192.1.1 | |
Port 12345 | |
User pi | |
IdentityFile ~/.ssh/raspberry.id_rsa |
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']) | |
:not(#search_form_input):not(#search_form_input_clear):not(#search_button):not(#search_form_input_homepage) { | |
-moz-appearance: none !important; | |
background-color: transparent; | |
color: black; | |
} | |
#downloads-indicator-counter { | |
color: white; | |
} |
#!/bin/bash | |
cat "$1" | | |
# code block tags | |
sed -E 's/(~~~|```)([a-z]+)/<pre><code class="\2">/g' | | |
sed -E 's|(~~~\|```)|</pre></code>|g' | | |
# inline code tag | |
sed -E 's/`(.*)`/@\1@/g' | | |
# italic tag | |
sed -E 's/\*/_/g' | |
<?php | |
/** | |
* Slice a given periods into multiples periods cut on months | |
* | |
* Example: 15/01 - 15/02 = 15/01 - 31/01 : 01/02 - 15/02 | |
* | |
* @param DateTime $start | |
* @param DateTime $end | |
* @yield array whith keys `start` & `end` containing `DateTime` formated |
Configurer le fichier ssh
$ cat ~/.ssh/config
Host pi
Hostname 5.50.77.180
Port 2812
User pi
IdentityFile ~/.ssh/raspberry.id_rsa
#!/bin/bash | |
files=`git diff --name-only | grep -E '.php$' ` | |
for file in $files; do | |
php -l $file > /dev/null | |
done |
#!/bin/bash | |
# .git/hooks/pre-commit | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
DEFAULT='\033[0m' | |
# loop on all commited PHP files | |
echo -e "\n${GREEN}Check PHP files${DEFAULT}\n" |