I hereby claim:
- I am jalons on github.
- I am jalons (https://keybase.io/jalons) on keybase.
- I have a public key ASDJXHgOe5PPSa1vwSR5oMIWQmE2kIvgLfDswtyMWvDHXQo
To claim this, I am signing this object:
ahlee@ipsum:~$ dd if=/dev/zero of=sda bs=1G count=1 | |
1+0 records in | |
1+0 records out | |
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.998008 s, 1.1 GB/s | |
ahlee@ipsum:~$ dd if=/dev/zero of=sdb bs=1G count=1 | |
1+0 records in | |
1+0 records out | |
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.60719 s, 412 MB/s | |
ahlee@ipsum:~$ sudo losetup /dev/loop0 sda | |
ahlee@ipsum:~$ sudo losetup /dev/loop1 sdb |
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#!/usr/bin/env python | |
import salt.config | |
import salt.client | |
opts = salt.config.master_config('/etc/salt/master') | |
_client = salt.client.LocalClient() | |
_ret = {} | |
for _group, _target in opts.get('nodegroups').iteritems(): | |
_ret[_group] = _client.cmd(tgt=_target, fun='test.ping', expr_form='compound').keys() | |
print _ret |
#!py | |
import pprint | |
import yaml | |
space_character = " " | |
def run(): | |
''' | |
Print the config files | |
''' | |
t = { |
Graphite does two things:
What Graphite does not do is collect data for you, however there are some tools out there that know
class Command(object): | |
''' | |
Enables to run subprocess commands in a different thread | |
with TIMEOUT option! | |
Based on jcollado's solution: | |
http://stackoverflow.com/questions/1191374/subprocess-with-timeout/4825933#4825933 | |
''' | |
def __init__(self, cmd): | |
self.cmd = cmd |
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
function map() { | |
emit(1, // Or put a GROUP BY key here | |
{sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count:1, | |
diff: 0, // M2,n: sum((val-mean)^2) | |
}); |
rsync (Everyone seems to like -z, but it is much slower for me)