This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"crypto/md5" | |
"encoding/binary" | |
"encoding/json" | |
"fmt" | |
"bufio" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://github.com/caius/fio/tree/master/examples | |
# Do some important numbers on SSD drives, to gauge what kind of | |
# performance you might get out of them. | |
# | |
# Sequential read and write speeds are tested, these are expected to be | |
# high. Random reads should also be fast, random writes are where crap | |
# drives are usually separated from the good drives. | |
# | |
# This uses a queue depth of 4. New SATA SSD's will support up to 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGET="$GOPATH/src/github.com/pandemicsyn/$1/*" | |
INSTALL_ARG="github.com/pandemicsyn/$1" | |
md5sum_now=`md5 $TARGET` | |
md5sum_last=`md5 $TARGET` | |
echo "Attempting build/install of $TARGET" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wg sync.WaitGroup | |
for i := 0; i < 200; i++ { | |
wg.Add(1) | |
go blastSwift("images", token, url, &wg) | |
} | |
fmt.Println("Waiting on survivors") | |
wg.Wait() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import json | |
import subprocess | |
import salt.client | |
error = False | |
keycmd = "sudo salt-key -L --out json --no-color --out-indent=-1" | |
out = subprocess.Popen(keycmd.split(), stdout=subprocess.PIPE).communicate()[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
min_drives = 10 | |
max_drives = 60000 | |
replicas = 3 | |
part_power = math.ceil(math.log(math.ceil(max_drives * 100.0 / replicas), 2)) | |
print "part_power: %d\npartition_count: %d\napproximate per drive with %d drives: %.02f\napproximate per drive with %d drives: %.02f" % (part_power, 2**part_power, min_drives, 2**part_power * replicas / min_drives, max_drives, 2**part_power * replicas / max_drives)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in a file called ~/.reverseit.py: | |
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
from sys import stdin, stdout | |
pchars = u"abcdefghijklmnopqrstuvwxyz,.?!'()[]{}" | |
fchars = u"ɐqɔpǝɟƃɥıɾʞlɯuodbɹsʇnʌʍxʎz'˙¿¡,)(][}{" | |
flipper = dict(zip(pchars, fchars)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import sys | |
from graphite.render.hashing import ConsistentHashRing | |
instances = [] | |
unwelcome_instances = [] | |
for arg in sys.argv[1:]: | |
unwelcome = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"unsafe" | |
"code.google.com/p/vitess/go/cache" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from diamond import * | |
import diamond.collector | |
class SwiftReconCollector(diamond.collector.Collector): | |
""" | |
Reads swift recon cache files to collect swift recon data | |
""" |