I hereby claim:
- I am guyromm on github.
- I am guyromm (https://keybase.io/guyromm) on keybase.
- I have a public key ASA2FHswmFNN6urHiISHq_vXZCoyPdjP0suEClu8pA7_0Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import re,sys | |
import csv | |
""" | |
we've got two modes of operation: | |
# extract a table from within an 'hours' heading, directly feedable into termsql | |
# echoing to stdout valid termsql input | |
cat table.org | tsorg.py 'hours' | termsql -r5 -0 -1 'select * from tbl' |
#!/usr/bin/env python from future import division | |
import sys | |
import datetime | |
import urllib,urllib2 | |
import json | |
from collections import defaultdict | |
fr = sys.argv[1] #example: 2016-03-01 | |
to = sys.argv[2] # example: 2016-03-31 |
# quick'n'dirty apache2 authenticated proxy | |
# do not forget to a2enmod auth_digest , proxy , proxy_* | |
ProxyRequests On | |
ProxyVia Off | |
<Directory /var/www/html> | |
Options -Indexes | |
</Directory> | |
<Proxy "*"> |
curl -sL https://acsiinema.org/install | sh
#!/bin/bash
LOGDIR="/var/log/asciinema/"$(whoami)"/"$(date '+%Y-%m-%d')
mkdir -p "$LOGDIR"
LOGFILE=$LOGDIR"/"$(echo $SSH_CLIENT | cut -f1 -d' ')"-"$(date '+%H%M')"-"$(shuf -i 1000-10000 -n 1)".log"
[ -z $ASCIINEMA_REC ] && exec /usr/local/bin/asciinema rec -w 3 -y "$LOGFILE" -c 'tmux'
#!/bin/bash | |
IS=$(virsh list | grep -v Name | awk '{print $2}') | |
for I in $IS ; do | |
BLKS="$(virsh domblklist $I| egrep -v '^(Target|\-\-\-)' | awk '{print $1}')" | |
for BLK in $BLKS ; do | |
virsh domblkstat $I $BLK | egrep -v '^$' | sed -e 's/^/'$I' /' | |
done | |
done |
//sample entry file | |
require('./node_modules/riot/dist/riot.js'); | |
require('./timer.tag') | |
require('./todo.tag') | |
require('./todo.css') | |
riot.mount('todo', { | |
title: 'I want to behave!', | |
items: [ |
<todo> | |
<h3><timer></timer> - { opts.title }</h3> | |
<ul> | |
<li each={ items }> | |
<label class={ completed: done }> | |
<input type="checkbox" checked={ done } onclick={ parent.toggle }> { title } | |
</label> | |
<a href="#" onclick={ parent.editExisting }>edit</a> |
#!/usr/bin/env coffee | |
http = require 'http' | |
fs = require 'fs' | |
oppressor = require 'oppressor' | |
Readable = require 'stream' | |
.Readable | |
server = http.createServer (req,res) => | |
stream = fs.createReadStream __dirname+'/node_modules/coffee-script/lib/coffee-script/parser.js' | |
stream.pipe oppressor req |
#!/usr/bin/env python | |
# usage | |
# 1. run on a jenkins node to get a grouping of processes by type with memory consumption: | |
# ps aux | /root/parseprocs.py | |
# 2. get a detail of which processes were included under a particular set of tags: | |
# ps aux | /root/parseprocs.py celery,python,user_attrs_actions |