This file contains 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 pycurl | |
import cStringIO | |
c = pycurl.Curl() | |
c.setopt(pycurl.VERBOSE, 1) | |
dummydata = "HI THIS IS SOME DATA" | |
c.setopt(pycurl.URL, "http://127.0.0.1:9000/noreadbody") |
This file contains 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
Michaels-MacBook-Pro:~ redbo$ ssh whoami.filippo.io | |
The authenticity of host 'whoami.filippo.io (178.32.139.168)' can't be established. | |
RSA key fingerprint is c8:9a:b0:9d:59:96:24:37:70:4c:ef:eb:31:47:68:40. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Warning: Permanently added 'whoami.filippo.io,178.32.139.168' (RSA) to the list of known hosts. | |
+---------------------------------------------------------------------+ | |
| | | |
| _o/ Hello Michael Barton! | |
| | |
This file contains 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 | |
set -e | |
# update and install some necessary system dependencies | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install build-essential memcached rsync xfsprogs git-core libffi-dev python-dev liberasurecode-dev python-virtualenv curl | |
# set up some directories we'll need to run everything | |
sudo mkdir -p /var/cache/swift /var/cache/swift2 /var/cache/swift3 /var/cache/swift4 /var/run/swift /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 /var/run/hummingbird /etc/hummingbird /etc/swift |
This file contains 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
a = the | |
c = and | |
b = be | |
e = a | |
d = of | |
ga = I | |
gb = keep | |
fa = have | |
ia = to | |
ib = really |
This file contains 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
type ConfigLoader interface { | |
GetHashPrefixAndSuffixFunc() (string, string, error) | |
GetPolicies() (conf.PolicyList, error) | |
GetSyncRealms() (conf.SyncRealmList, error) | |
GetRing(ringType, prefix, suffix string, policy int) (ring.Ring, error) | |
} |
This file contains 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
redbo@saio3:~/gocode/src/github.com/troubling/hummingbird$ sw head proxyserver/test | |
Content-Length: 23181296 | |
Content-Type: application/octet-stream | |
Etag: "826fb3a92461d85a30647a9a4ccb2679" | |
Last-Modified: Fri, 05 May 2017 16:30:34 GMT | |
X-Object-Meta-Mtime: 1462673034.227554 | |
X-Trans-Id: 14bbc2d17a06718e | |
redbo@saio3:~/gocode/src/github.com/troubling/hummingbird$ sw get proxyserver/test | wc --bytes | |
1081344 |
This file contains 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
type slowReader struct { | |
readChan chan int | |
inReader chan struct{} | |
id int | |
} | |
func (s *slowReader) Read(p []byte) (i int, err error) { | |
if s.inReader != nil { | |
s.inReader <- struct{}{} | |
close(s.inReader) |
This file contains 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 | |
cd /etc/swift | |
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz | |
swift-ring-builder object.builder create 10 3 1 | |
swift-ring-builder object.builder add r1z1-127.0.0.1:6010R127.0.0.1:8010/sdb1 1 | |
swift-ring-builder object.builder add r1z2-127.0.0.1:6020R127.0.0.1:8020/sdb2 1 | |
swift-ring-builder object.builder add r1z3-127.0.0.1:6030R127.0.0.1:8030/sdb3 1 |
This file contains 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
type RingBuilder struct { | |
LastPartGatherStart int64 `pickle:"_last_part_gather_start"` | |
LastPartMovesEpoch int64 `pickle:"_last_part_moves_epoch"` | |
PartPower int64 `pickle:"part_power"` | |
DevsChanged bool `pickle:"devs_changed"` | |
Replicas float64 `pickle:"replicas"` | |
MinPartHours int64 `pickle:"min_part_hours"` | |
Parts int64 `pickle:"parts"` | |
Overload float64 `pickle:"overload"` | |
Dispersion float64 `pickle:"dispersion"` |
This file contains 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 | |
cd /etc/swift | |
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz | |
swift-ring-builder object.builder create 10 3 1 | |
swift-ring-builder object.builder add r1z1-127.0.0.1:6010R127.0.0.1:8010/sdb1 1 | |
swift-ring-builder object.builder add r1z2-127.0.0.1:6020R127.0.0.1:8020/sdb2 1 | |
swift-ring-builder object.builder add r1z3-127.0.0.1:6030R127.0.0.1:8030/sdb3 1 |