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
#!/usr/bin/env python | |
import timeit | |
from random import choice | |
def getTriplets(top=1000): | |
triplets = [] | |
for c in xrange(top,3,-1): | |
maxb = top-c - 1 | |
for b in xrange(maxb,0,-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
/siteroot/ | |
runserver.py | |
site.wsgi | |
/templates/ (for root/global templates) | |
layout.html | |
/static/ | |
/css/ | |
/js/ | |
/section1/ | |
__init__.py |
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
clock: | |
/etc/sysconfig/clock: | |
file.managed: | |
- source: salt://core/files/clock | |
/etc/localtime: | |
file.symlink: | |
- target: /usr/share/zoninfo/America/Los_Angeles | |
- force: true |
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
[INFO ] Executing state pkg.installed for python-pip | |
[INFO ] Package python-pip is already installed | |
[ERROR ] An un-handled exception was caught by salt's global exception handler: | |
TypeError: sequence item 1: expected string, int found | |
Traceback (most recent call last): | |
File "/usr/bin/salt-call", line 11, in <module> | |
salt_call() | |
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 77, in salt_call | |
client.run() | |
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 303, in run |
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
#!/usr/bin/env python | |
import redis | |
import sys | |
origin_ip,origin_port = sys.argv[1].split(":") | |
target_ip,target_port = sys.argv[2].split(":") | |
origin = redis.Redis(origin_ip,origin_port) | |
target = redis.Redis(target_ip,target_port) |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sort" | |
"time" | |
) | |
const ( |
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
#!/usr/bin/env python | |
import requests | |
for pod in requests.get("http://localhost:8000/api/knownpods").json()['Data']: | |
print "sentinel monitor {Name} {Info[IP]}:{Info[Port]} 2\nsentinel set {Name} auth-pass {AuthToken}".format(**pod) |
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
package proxy | |
import ( | |
"io" | |
"log" | |
"net" | |
) | |
func Proxy(srvConn, cliConn *net.TCPConn) { | |
// channels to wait on the close event for each connection |
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
binary: | |
go build | |
deps-save: | |
godep save | |
deps: | |
godep restore |
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
Do you want to read a git diff? | |
Or write an ansible play? | |
I never see you anymore | |
Come out the door | |
It's like you've gone away... | |
We used to be system admins | |
And now we're not | |
I wish you would tell me why! | |
Do you want to build a container? | |
It doesn't have to be with docker |
OlderNewer