Skip to content

Instantly share code, notes, and snippets.

centos6:
$ > tar tvf ex.tar
-rw-r--r-- evan/evan 0 2016-08-03 00:59 ./a
-rw-r--r-- evan/evan 0 2016-08-03 00:59 ./a
-rw-r--r-- evan/evan 0 2016-08-03 00:59 ./aa.yaml
-rw-r--r-- evan/evan 0 2016-08-03 00:59 ./b
centos7:
@eam
eam / uu.rb
Last active August 2, 2016 15:54
#!/usr/bin/env ruby
require 'base64'
eval Base64.decode64 DATA.read
__END__
cHV0cyAidGhpcyBwcm9ncmFtIGhhcyBTUE9JTEVSUyIKcHV0cyAiYnV0IGl0
J3Mgb2ssIGJlY2F1c2UgdGhpcyBwYXJ0IGlzIGhpZGRlbiIK
#!/usr/bin/ruby
# Quick and dirty comic book reader
# Bugs: Can't go backwards and won't clean up properly if you quit early.
require 'RUDL'
include RUDL
include Constant
XRES = 1600
[ -z "$RETRIES" ] && RETRIES=2
retry=0
while true; do
/usr/sbin/ntpdate $OPTIONS $tickers &> /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] || [ $retry -ge "$RETRIES" ] && break
sleep $[10 * (1 << $retry)]
retry=$[$retry + 1]
done
@_=map{open$_{$_},q q>q,$_?$+:eval lc join$,,sort qw/_[$_] FI E A;\ D @_
NED$/}$|..$=;$_="OYPY_H\030c",@==grep{vec($/,$,++,2**3^0)=$=^ord$_}/( .) # (. )
/sixgoos,!!1;eval$/,! @=for@_{sort{$b<=>$a}%_}; ##
print "Hello world!"; use 5.008; # #
warn "Just another Perl hacker,\n" if defined undef; #######
booger:git evan$ time grep -r foo glibc > /dev/null
real 0m5.007s
user 0m4.753s
sys 0m0.229s
booger:git evan$ time ggrep -r foo glibc > /dev/null
real 0m0.281s
user 0m0.109s
sys 0m0.160s
m = MultipleCmd.new
m.commands = ["ssh foo ls", "ssh bar rsync"]
m.perchild_timeout = 10 # ten seconds per command
m.global_timeout = 15 # fifteen second timeout for everything
m.maxflight = 10 # parallelism
result = m.run
[eam@nitre bot]$ crystal src/main.cr
Error in ./libs/framework/configuration.cr:122: undefined method 'mapping' for JSON:Class
JSON.mapping({
^~~~~~~
booger:~ evan$ head -3 .emacs
(setq viper-mode t)
(require 'viper)
(setq set-auto-mode t)
eam@nitre ~]$ xxd
15:14 < DeBot> ␣���␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12 (codepoints)
0000000: 3135 3a31 3420 3c20 4465 426f 743e 20e2 15:14 < DeBot> .
0000010: 90a3 efbf bdef bfbd efbf bde2 90a3 e290 ................
0000020: a3e2 90a3 e290 a3e2 90a3 e290 a3e2 90a3 ................
0000030: e290 a3e2 90a3 e290 a3e2 90a3 e290 a3e2 ................
0000040: 90a3 e290 a3e2 90a3 e290 a3e2 90a3 e290 ................
0000050: a3e2 90a3 e290 a3e2 90a3 e290 a3e2 90a3 ................
0000060: e290 a320 5b5d 2030 2f31 3220 2863 6f64 ... [] 0/12 (cod
^C