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 | |
/** | |
* 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 |
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 | |
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' | |
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
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; | |
} |
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
Host pi | |
Hostname 168.192.1.1 | |
Port 12345 | |
User pi | |
IdentityFile ~/.ssh/raspberry.id_rsa |
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 | |
# colors | |
green='\e[0;32m' | |
darkred='\e[1;31m' | |
lightblue='\e[1;34m' | |
defaut='\033[0m' | |
# importants variables | |
today=$(date +%Y-%m-%d) |
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
# 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\] \$ " |
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 | |
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);} | |
} |
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
require 'git' | |
require 'fileutils' | |
require 'date' | |
require 'pathname' | |
desc "Print directory-tree" | |
task :tree, [:folder, :folder_only] do |t, args| | |
args.with_defaults(:folder_only => false) | |
$folder_only = args.folder_only == "true" |
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 | |
green='\e[0;32m' | |
darkred='\e[1;31m' | |
lightblue='\e[1;34m' | |
default='\033[0m' | |
echo -e "${darkred}***Bootstrap Linux Mint setup***${default}" | |
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
# Edit materials | |
Sketchup.active_model.materials.to_a.each do |mat| | |
case mat.name | |
when / Ext/ | |
Sketchup.active_model.materials.remove(mat) unless mat.deleted? | |
when / Int/ |