01: !0 // absolute best score 2 : vv
//~02: 0,a // absolute best score 3 : vv // old question
02: str_rot13 // absolute best score 9 : vv
03: !0 // absolute best score 2 : vv
04: 0 // absolute best score 1 : vv
05: π‘ // absolute best score 1 : vv
06: $a=function()use(&$a){return$a;} // absolute best score 22 : xx 32
07: (object)[1] // absolute best score 12 : vv
08: // absolute best score 23 : xx --
This file contains hidden or 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
## note that there's two notations: :(exclude) or :! | |
git diff <branch1> <branch2> -- ':(exclude)*/vendor/*' ':(exclude)*/assets/*' ':!*/build/*' ':!*.lock' |
This file contains hidden or 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 | |
## workspace Number ( count ) | |
WS_N=$(wmctrl -d | wc -l) | |
## workspace ID | |
WS_ID=$(wmctrl -d | grep '*' | cut -d ' ' -f1) | |
## next workspace id ( loops around ) | |
NEXT_ID=$(( ( $WS_ID + 1 ) % $WS_N )); |
This file contains hidden or 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 | |
## workspace Number ( count ) | |
WS_N=$(wmctrl -d | wc -l) | |
## workspace ID | |
WS_ID=$(wmctrl -d | grep '*' | cut -d ' ' -f1) | |
## previous workspace id ( loops around ) | |
PREV_ID=$(( ( $WS_ID - 1 ) % $WS_N )); |
This file contains hidden or 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
// if end date is in future | |
if ( $date_catchup_timestamp_end >= strtotime( 'now' ) ) { | |
// [...] do a lot of stuff | |
$program->end = $date_catchup_timestamp_end; | |
} | |
This file contains hidden or 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 | |
function wget_site(){ | |
## Remove protocol part of domain to add it to the allow list | |
# source : https://www.cyberciti.biz/faq/get-extract-domain-name-from-url-in-linux-unix-bash/ | |
local url="$1" | |
local domain="$1" | |
domain="${domain#http://}" | |
domain="${domain#https://}" | |
domain="${domain#ftp://}" | |
domain="${domain#scp://}" |
This file contains hidden or 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
# use declare | |
var1="aaa"; var2=var1; declare "$var2=bbb"; echo $var1; echo $var2 | |
# returns: | |
# bbb | |
# var1 | |
var1="aaa"; var2=var1; var2=bbb; echo $var1; echo $var2 | |
# returns: |
This file contains hidden or 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 | |
# name of app | |
if [ -z "$1" ]; then | |
echo "provide a name for the window to be raised" | |
exit; | |
fi | |
app_name="$1" | |
# get current desktop: | |
desktop_id=$(xprop -root | grep "^_NET_CURRENT_DESKTOP" | cut -f 3 -d ' ') |
This file contains hidden or 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
node_modules | |
*tgz* | |
*tar* | |
*zip* | |
.editorconfig | |
.jshintrc | |
CHANGELOG.md | |
README* | |
readme* | |
CONTRIBUTING.md |
This file contains hidden or 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 | |
function wp_make_theme() { | |
local curdate=`date +%Y-%m-%d-%H%M%S` | |
local exclude=''; | |
local name=${1%/} | |
if [ -f ./exclude_prod ]; then | |
exclude="./exclude_prod"; | |
elif [ -f ~/.exclude_prod ]; then | |
exclude="$HOME/.exclude_prod"; |