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 | |
from subprocess import Popen, PIPE, STDOUT | |
try: | |
search = sys.argv[1] | |
except: | |
print "Need to enter a email or a part of an email" |
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
# The following part is optional! It just compiles and installs the chosen | |
# global ruby version to help on bootstrapping. To achieve this, it uses | |
# "ruby-build" utility. | |
define rbenv::compile($user,$global_ruby="1.9.2-p290",$bundler_version='1.1.3') { | |
# STEP 1 | |
exec { "checkout rbenv for ${user}": | |
command => "git clone git://github.com/sstephenson/rbenv.git .rbenv", | |
user => $user, | |
cwd => "/home/${user}", |
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
PYTHONPATH=/opt/graphite/webapp/graphite | |
MODULE=graphite_uwsgi |
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 fabric.api import * | |
@task | |
@runs_once | |
def prod(): | |
env.roledefs['app'] = ['web1.sc', 'web2.sc', 'web3.sc', 'web4.sc'] | |
env.roledefs['lb'] = ['lb1.sc', 'lb2.sc'] | |
env.roledefs['sql'] = ['mysql1.sc', 'mysql2.sc'] | |
@task |
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
[root@photoblogcom named]# dig +trace test1.photoblog.com | |
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 <<>> +trace test1.photoblog.com | |
;; global options: printcmd | |
. 44083 IN NS d.root-servers.net. | |
. 44083 IN NS e.root-servers.net. | |
. 44083 IN NS f.root-servers.net. | |
. 44083 IN NS g.root-servers.net. | |
. 44083 IN NS h.root-servers.net. | |
. 44083 IN NS i.root-servers.net. |
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 | |
# | |
# usage: ./check-spf.py domain.com | |
# | |
# author: [email protected] | |
# | |
# | |
import sys |
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 termcolor import colored | |
import requests | |
import time | |
while True: | |
ltc = requests.get("https://btc-e.com/api/2/ltc_usd/ticker").json() | |
btc = requests.get("https://btc-e.com/api/2/btc_usd/ticker").json() | |
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 fabric.api import env, run | |
import time | |
env.hosts = ['web01-east'] | |
def logtime(method): | |
def timed(*args, **kw): | |
ts = time.time() |
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
Install | |
-------------------- | |
1) Put the bigpanda.rb file in /etc/sensu/extensions | |
2) Edit the bigpanda.json file for your API token and place it in /etc/sensu/conf.d | |
3) restart sensu |
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
{ | |
"mailer": { | |
"admin_gui": "http://monitor.domain.com/", | |
"mail_from": "[email protected]", | |
"mail_to": "[email protected]", | |
"smtp_domain": "domain.com" | |
} | |
} |