Skip to content

Instantly share code, notes, and snippets.

View whoo's full-sized avatar

Dominique DERRIER whoo

  • Transition
  • Montreal
View GitHub Profile
#!/bin/sh
# script generated by ./play.it 2.11.0~dev - http://wiki.dotslashplay.it/
set -o errexit
# Set executable file
APP_EXE='lba2.exe'
APP_OPTIONS=""
LD_LIBRARY_PATH=":/usr/$(portageq envvar LIBDIR_x86)/debiancompat:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
@whoo
whoo / gist:5f642f3e399380ec8085f23ae62cecc0
Created June 18, 2018 00:23
Montage | photocollage imagemagick
montage -gravity center *JPG -tile 5x6 -thumbnail 250x250 -sharpen 10 -bordercolor grey20 +polaroid -geometry '1x1-60-60<' -tile 5x6 out.jpg
wget -q -O- ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest | egrep '^ripencc\|..\|ipv4\|.*\|.*\|(assigned|allocated)$' > $tmp_ripe_file
wget -q -O- ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-latest | egrep '^apnic\|..\|ipv4\|.*\|.*\|(assigned|allocated)$' >> $tmp_ripe_file
wget -q -O- ftp://ftp.arin.net/pub/stats/afrinic/delegated-afrinic-latest | egrep '^afrinic\|..\|ipv4\|.*\|.*\|(assigned|allocated)$' >> $tmp_ripe_file
wget -q -O- ftp://ftp.arin.net/pub/stats/lacnic/delegated-lacnic-latest | egrep '^lacnic\|..\|ipv4\|.*\|.*\|(assigned|allocated)$' >> $tmp_ripe_file
#!/bin/bash
PATH=${GZIP_BINDIR-'/bin'}:$PATH
exec 7z e -so -bd "$@" 2>/dev/null | cat
#!/bin/bash
KEY="$1"
NAME="key"
gpg --armor --export $KEY > $NAME.pub
gpg --armor --export-secret-keys $KEY > $NAME.priv
gpg --armor --gen-revoke $KEY > $NAME.rev
GET /_cat/indices?v
POST /_reindex?refresh&wait_for_completion=false
{
"source": {
"index": "logstash-2017.03.*"
},
"dest": {
"index": "logstash-2017-q1"
}
}
int pingTCP(char *host)
{
int sockfd,ping=0;
struct hostent *hostent;
struct sockaddr_in sockaddr_in;
fd_set fdset;
struct timeval tv;
#!/bin/bash
function Relink
{
x=1
for a in $OLDPWD/*JPG
do
c=$(printf %04d.jpg $x)
ln -s "$a" $c
x=$(($x+1))
cols=shutil.get_terminal_size((80, 20)).columns
MAX=cols-15
def pbar(cur,size):
elmt=int(cur/size*MAX)
print("\033[?25l",end="")
print("\033[0G[",end="")
print("#"*elmt,end="")
print("."*(MAX-elmt),end="")
print("] %d"%cur,end="")
@whoo
whoo / GetMpv
Last active July 15, 2016 01:06
LciPlayer
#!/bin/bash
# $1 http://lci.tf1.fr/jt-13h/videos/2016/le-13-heures-du-14-juillet-2016-8764691.html
URL=$(wget -q "$1" -O- | perl -nle 'print $a if ($a) = $_ =~m|embedframe/.*c0K11([0-9]*)|'
echo $URL
mpv http://www.wat.tv/get/iphone/$URL.m3u8