THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
M[16],X=16,W,k;main(){T(system("stty cbreak") | |
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i | |
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M | |
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< | |
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) | |
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d | |
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] | |
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4; | |
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4|| | |
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2 |
// EDIT: SOLVED! | |
// The arguments are supposed to be | |
// [--no-pager log --all --source --abbrev-commit --grep=Story-Id: 12345] | |
// not | |
// [--no-pager log --all --source --abbrev-commit --grep='Story-Id: 12345'] | |
// because then it doesn't find the commits and then output is empty. | |
// The problem is that my function is returning empty stdout buffer | |
// even though the output is not empty when I run git from CLI. | |
// |
next-server 10.0.3.2; | |
if ( substring(option vendor-class-identifier, 0, 9) = "AAPLBSDPC" | |
and substring(option vendor-class-identifier, 10, 4) = "i386" ) { | |
# This needs to be there to tell the client we're an Apple boot server | |
option vendor-class-identifier "AAPLBSDPC"; | |
# Normally the client asks for a list, we respond, they tell us what we want, | |
# then we send a select back with the information of that image. | |
# This skips all that and forces the select down to the client. | |
option vendor-encapsulated-options 01:01:02; | |
# Use ipxe.efi for native drivers, or snponly.efi for underlying UNDI |
#!/bin/bash | |
VERSION_URL="https://appengine.google.com/api/updatecheck" | |
VERSION=$(echo $(curl ${VERSION_URL}) | sed -E 's/release: \"(.+)\"(.*)/\1/g') | |
ARCH="386" | |
if [[ `uname -a` == *x86_64* ]] | |
then | |
ARCH="amd64" | |
fi |
VAGRANTFILE_API_VERSION = '2' | |
$install = <<SCRIPT | |
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig | |
chmod +x /usr/local/bin/fig | |
SCRIPT | |
$build = <<SCRIPT | |
cd /vagrant | |
fig build |
#!/bin/bash | |
# Runs the specified command (provided by the first argument) in all tmux panes | |
# in every window. If an application is currently running in a given pane | |
# (e.g., vim), it is suspended and then resumed so the command can be run. | |
all-panes() | |
{ | |
all-panes-bg_ "$1" & | |
} |