Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
#!/bin/bash | |
set -euxo pipefail | |
cd "$(dirname "$0")" | |
target="${1:-hockeypuck}" | |
interactive="${2:-}" | |
container=${target}-builder | |
volume=/root/HOST |
#!/bin/bash -eu | |
cd /var/lib/collectd/rrd/$HOST | |
for f in $(find -name *.rrd); do | |
echo "rrdtool dump $f" | |
rrdtool dump $f > ${f%.rrd}.xml | |
done | |
rsync -avz --exclude *.rrd /var/lib/collectd/rrd/$HOST/ $COLLECTD_HOST:/var/lib/collectd/rrd/$HOST/ |
(2 * 2 * 5 * 7 * 37 * 149 * 5417 * 148781 * 51939996061871).to_s(16).scan(/../).map { |x| x.hex.chr }.join |
--- V3.car 2015-09-18 09:21:11.000000000 +0000 | |
+++ V3.car 2016-04-01 14:51:17.783726416 +0000 | |
@@ -61,16 +61,16 @@ | |
#--------------------------- | |
[ hover ] | |
-hAbove = 2.5 | |
+hAbove = 4.0 | |
hRayLen = 4.0 | |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
#!/bin/sh | |
# -*- sh -*- | |
# vim: ft=sh | |
: << =cut | |
=head1 NAME | |
axp_pmu - Plugin to monitor power |
# See https://github.com/bbatsov/rubocop | |
# Add this to the top of your .rubocop.yml: | |
# inherit_from: | |
# - https://gist.githubusercontent.com/infertux/cdd2ccc6e0a0cd94f458/raw | |
# AllCops | |
AllCops: | |
TargetRubyVersion: 2.3 |
l={};s=m=[];i=pc=mc=0 | |
alias p proc | |
h={'>':p{mc+=1},'<':p{mc-=1},'+':p{m[mc]+=1},'-':p{m[mc]-=1},'.':p{putc m[mc]}} | |
j={'[':->(i){s<<i;->(){pc=l[pc-1]+1 if m[mc]==0}},']':->(i){o=s.pop;l[o]=i;p{pc=o}}} | |
ins=DATA.each_char.map{|c|c=:"#{c}";x=(j[c]||->(_){h[c]||p{}}).(i);i+=1;x} | |
while k=ins[pc];pc+=1;m[mc]||=0;k.();end | |
__END__ | |
[ This program prints "Hello World!" and a newline to the screen, its | |
length is 106 active command characters. [It is not the shortest.] |
#!/bin/bash | |
# -*- sh -*- | |
# vim: ft=sh | |
: << =cut | |
=head1 NAME | |
unicorn_connections - Plugin to monitor the number of Unicorn connections |
DROP TABLE IF EXISTS parent; | |
DROP TABLE IF EXISTS child; | |
CREATE TABLE parent( | |
identity_id integer, | |
valid_range int4range | |
); | |
CREATE TABLE child( | |
valid_range int4range, |