include_recipe "apache2::mod_python"
version = node[:graphite][:version]
pyver = node[:graphite][:python_version]
package "python-cairo-dev"
package "python-django"
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
| from twisted.internet import reactor | |
| from twisted.protocols.memcache import MemCacheProtocol | |
| from txconnpool.pool import PooledClientFactory, Pool | |
| class _PooledMemCacheProtocol(MemCacheProtocol): | |
| factory = None | |
| def connectionMade(self): | |
| MemCacheProtocol.connectionMade(self) |
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
| from twisted.internet import reactor | |
| from twisted.internet.address import IPv4Address | |
| from twisted.protocols.memcache import MemCacheProtocol | |
| from twisted.trial.unittest import TestCase | |
| from txconnpool.pool import PooledClientFactory, Pool | |
| CACHE_POOL = None | |
| class _PooledMemCacheProtocol(MemCacheProtocol): | |
| factory = None |
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/python | |
| import json | |
| import urllib2 | |
| url = 'http://192.168.3.14:9200/_cluster/health?pretty=true' | |
| results = urllib2.urlopen(url).read() | |
| stats = json.loads(results) |
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
| data := make(map[string]string) | |
| data["a"] = "a" | |
| data["b"] = "b" | |
| data["c"] = "c" | |
| data["d"] = "d" |
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 json | |
| import sys | |
| import os | |
| try: | |
| import readline | |
| except ImportError: | |
| print("Module readline not available.") | |
| else: | |
| import rlcompleter |
Basic stuff:
sudo apt-get update -y
sudo apt-get install -y bundler curl git guake network-manager-openvpn network-manager-openvpn-gnome openvpn python python-dev python-virtualenv ruby shellcheck virtualbox vagrant vim xclip
Slack:
sudo apt-add-repository -y ppa:rael-gc/scudcloud
sudo apt-get update -y
I hereby claim:
- I am ameng on github.
- I am ameng (https://keybase.io/ameng) on keybase.
- I have a public key whose fingerprint is 89A4 7625 D774 878B 63E1 35ED 84F1 2958 A261 3F08
To claim this, I am signing this object:
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 time | |
| import os | |
| from boto import utils, connect_ec2 | |
| ELASTIC_IPS = os.environ['ELASTIC_IPS'].split(', ') | |
| NUMBER_OF_TRIES = 5 | |
| metadata = utils.get_instance_metadata() |
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 | |
| from argparse import ArgumentParser | |
| from boto.ec2 import EC2Connection | |
| from boto.ec2.elb import ELBConnection | |
| from socket import gethostbyname | |
| from sys import argv | |
| class NodeLookup: |