Skip to content

Instantly share code, notes, and snippets.

Ian Cook thinkspill

View GitHub Profile
@thinkspill
thinkspill / MajorityValues.php
Last active Jul 11, 2018
Calculates Majority Values
View MajorityValues.php
<?php
$a = 1;
$b = 10;
$c = 100;
$d = 1000;
$v[] = '0000000';
View waitForSql.sh
#!/usr/bin/env bash
slowFortune() {
/usr/games/fortune -l > ./fortune && while ! sqlIsListening && read line; do echo $line; sleep 1 ; done < ./fortune
printf "\n~ fin...? ~\n\n"
}
sqlIsListening() {
return `lsof -i | grep LISTEN | grep -qs sqlservr; echo $?`
}
@thinkspill
thinkspill / phanalyze.sh
Last active Dec 14, 2016
Shortcut to running phan on a subdirectory of php files
View phanalyze.sh
#!/usr/bin/env bash
time /web/ee2/vendor/bin/phan -y 10 -q -j 4 | tee /dev/tty | wc -l
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.