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
# port forwarding 9991-9999 | |
xports='ssh vm -v `for i in {1..9}; do echo "-R 999$i:127.1:999$i "; done`' | |
# tmux exists or new | |
tmux='tmux attach || tmux new' | |
# switch submodule to ref (in submodule dir) | |
subm_co='git checkout master; git fetch; git checkout' | |
# !!! |
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
!WA:2!DVxd0Xr119RXRnUSKcwY2czHjmyJfYySS2DLKLDXiRvw2s26lVALTbdrZS7osZGwnZ4zMvYYjPyReiQqsPrP)tstbcrjLMMMsHLycFea)xCAoN2MCoxPsOB)iPjkTPTPjPPoF0uAcU377nZUZkTY4A4Cspzpy75J3xZ797(7(7EFpeosf2XIu3oRlsfJwrQksn11pFc5KJKYYWSnJ0gwhmqGa9fO(6ACHegwPuSI6(sZ1enT2PoLSvkX4ggPD0mNXXi5ykw2Ag6vjm4)L1j7DOHSvC64CHUW3Rm8xcEdOod)FBp1WkML3)jYiBPiU)mPtlEuvnhLzSuggBH4tyQeBylJmMUfVFTtPSQS8R5dmbbHaZlNXr1WQxthSo2bJzNuoTsal5KS7BkMTJSLtWOA6Aobtme(p2QbN0XsB4HXbA11y5E59ptkLezgAiQxT6O9U6B)d0vuhAiiNXso8K2MkPt3zk7GlyNjHYyk6o9JLw7KzhSTw7p(G9hV1yXJMb7KeMPLNqXkFX6ZsblwS(7R9U6kg7jj6qroTJAmD5rvSdoDgD3HqqRj8MVo89(lO5RZRP7OyPlN(i8j1JNvwpj(X2Nb(IeT1EpXBp202kPhI9aO2nPLkMLXWzucNrlv26J2490x3NqBRkPYoKf2z97yj7ih488gz)0JOp3e93wS2BVNOPnKtT)O24SCLXgndUEgmk(vNSsiCWyjtlBBtxLWbNE1DyxM0qFiTHdolFjHp2VYzWp8ySfq8BtwxBuzAHOjO89dvfv3qxzwfzBAOOOpSJ6QNpfo9sLyqAY2YwbB0u2tsLHgBWUJoQSMowxy3WVXQHBd2dC74LRDXpzgQEACmqwn9HmS4DCqxatN64GlqfjF9PQDgnSS9BKXkPYgld2sh7n0fEdA2gUzO25tIi5ugJR3)4AMksZ6DlbvvH1GFgvoDkJbtMX2XyuvOIAsWVCtbdc7xfwBqyDpAnW6FTWwkJUPMQhUoyJqLW1c3iSj4gar46H355ZyR0(jr8 |
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
#!/usr/bin/env bash | |
for i in `git diff --name-only master | egrep '\.php$'` ; do | |
[ ! -e $i ] && continue | |
msg=`php -l $i 2>1` | |
if echo "$msg" | egrep -v '^No syntax' > /dev/null; then | |
echo $msg; | |
exit 255 | |
fi | |
done | |
echo OK |
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
# ~/.oh-my-zsh/custom/themes/mert.zsh-theme | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\ | |
%{$reset_color%}:%{$fg[magenta]%}%~\ | |
$(git_prompt_info) \ | |
%{$fg[cyan]%}%(!.#.%%)%{$reset_color%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" |
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/sh | |
COMMAND_ENV="env -i TERM=screen LANG=C LC_ALL=C" | |
if [ -e $(dirname "$0")/nsenter ]; then | |
# with boot2docker, nsenter is not in the PATH but it is in the same folder | |
NSENTER=$(dirname "$0")/nsenter | |
else | |
NSENTER=nsenter | |
fi |
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
Array.from(document.querySelectorAll('.feed_row a')).forEach(function(el){ | |
if(el.href.match(/https?%3A%2F%2Fmeduza.io%2Fshapito%2F/)){ | |
var parent = el.parentElement; | |
while(Array.from(parent.classList).indexOf('feed_row') == -1) parent = parent.parentElement; | |
parent.style.display = 'none'; | |
} | |
}); |
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
import random | |
def get_vow(): return random.choice(list('уеыаоэяию')) | |
def get_con(): return random.choice(list('йцкнгшщзхфвпрлджчсмтб')) | |
def get_word(length=0): |
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
buildscript { | |
ext.kotlin_version = "1.0.1-2" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
configurations { |
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 | |
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $protected_branch = $current_branch ] | |
then | |
read -p "You're about to commit in master, is that what you intended? [y/N] " -n 1 -r < /dev/tty | |
echo | |
if echo $REPLY | grep -E '^[Yy]$' > /dev/null |
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
<?php | |
function progressBar($cur = 0, $max = 0, $full = '#', $empty = ' ') | |
{ | |
$p = (int)($cur / $max * 100); | |
return $max < 100 || $cur % (int)($max / 100) == 0 || $p == 100 ? | |
sprintf("\r[%s%s] %d%% %d/%d", str_repeat($full, $p), str_repeat($empty, 100 - $p), $p, $cur, $max) : ''; | |
} |
NewerOlder