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 | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| Tail project log | |
| OPTIONS: |
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 | |
| class Broom | |
| { | |
| public function rememberMe() | |
| { | |
| static $outcome; | |
| if ($outcome) return $outcome; | |
| return $outcome = rand(); | |
| } |
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
| for k in `git branch -a | grep origin | grep -v HEAD | sed s/^..//`; do | |
| echo -e `git log -1 --pretty=format:"%ci %cr" "$k"`\\t"$k"; | |
| done | sort |
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 | |
| dry_run=0 | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 [-n] ["string_to_date"] | |
| Remove branches older than specified, human-readable date passed as a param |
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 (typeof _ !== 'function') { | |
| throw new Error('This is only intended for lodash use'); | |
| } | |
| // "test" object | |
| var obj = { | |
| name: { | |
| last: "Hello", | |
| nofd: ['nope', 'hoope'], | |
| }, |
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 | |
| ag -l '$1' | xargs -I{} sed -ibak 's/$1/$2/' {} |
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
| set @i = 1; | |
| update table | |
| set field = @i := @i + 1 | |
| where field2 = 11; |
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 | |
| # head -n200 /dev/urandom | cksum :: get output from urand and 'convert' it to dec; not exactly perfect | |
| # sed :: remove anything that's NaN (e.g. spaces) | |
| # head :: make the generated rand number 10 digits long | |
| head -n200 /dev/urandom | cksum | sed -E 's/[^0-9]+//' | head -c 10 |
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 | |
| docker exec -it $(basename `pwd`) $@ |
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 | |
| ag -l 'strict_types = 1' src tests | xargs -I{} sed -i "" 's/strict_types = 1/strict_types=1/' {} |
OlderNewer