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 boto.ec2 | |
import sys | |
from pprint import pprint | |
all_regions = [x.name for x in | |
boto.ec2.connect_to_region('us-east-1').get_all_regions()] | |
instances=[] | |
for region in all_regions: | |
instances.extend(boto.ec2.connect_to_region(region).get_only_instances()) |
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
From ffd15b7565277569d6bdf57f6493841dabe6a412 Mon Sep 17 00:00:00 2001 | |
From: Gene Wood <gene_wood@cementhorizon.com> | |
Date: Thu, 3 Jul 2014 09:39:37 -0700 | |
Subject: [PATCH] Adding X- header contents to the body of the email in a | |
non-displaying div to enable easier Gmail filtering | |
--- | |
.../BMO/template/en/default/email/bugmail.html.tmpl | 19 +++++++++++++++++++ | |
1 file changed, 19 insertions(+) |
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
fromaddr = 'me@example.com' | |
toaddr = 'you@example.org' | |
servername = 'smtp.example.com' | |
username = 'username' | |
password = 'password' | |
import smtplib | |
import time | |
server = smtplib.SMTP(servername, 25) | |
server.set_debuglevel(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
# Find your OS version https://iuscommunity.org/pages/Repos.html#release-packages | |
sudo yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-11.ius.centos6.noarch.rpm | |
sudo yum install -y python27 python27-devel python27-pip openssl-devel | |
sudo pip2.7 install cx_Freeze | |
git clone https://github.com/NagiosEnterprises/ncpa.git | |
cd ncpa/build | |
make build_rpm |
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
mkdir workspace | |
cd workspace | |
sudo cp /usr/share/subsonic/subsonic.war /usr/share/subsonic/subsonic.war.orig | |
unzip /usr/share/subsonic/subsonic.war | |
dos2unix WEB-INF/jsp/top.jsp # These dos2unix and unix2dos steps are needed because the files have DOS | |
dos2unix WEB-INF/jsp/index.jsp # line endings and the patches, if copy/pasted have UNIX line endings | |
cat > change-default-view-to-newest.patch <<'End-of-message' | |
diff -ru orig/WEB-INF/jsp/index.jsp new/WEB-INF/jsp/index.jsp | |
--- orig/WEB-INF/jsp/index.jsp 2014-01-23 23:07:04.000000000 -0800 | |
+++ new/WEB-INF/jsp/index.jsp 2014-08-11 09:59:33.000000000 -0700 |
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 | |
# Set this to the ARN of the trusted account role | |
trusted_account_role_arn="arn:aws:iam::123456789012:role/SecurityMonkeyInstanceProfile" | |
import boto.iam | |
conn_iam = boto.iam.connect_to_region('universal') | |
role_name='SecurityMonkey' | |
assume_role_policy_document = '''{ | |
"Version":"2012-10-17", |
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 boto.iam | |
conn_iam = boto.iam.connect_to_region('universal') | |
role_name='SecurityMonkeyInstanceProfile' | |
assume_role_policy_document = '''{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { |
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
echo "mypassword" | python -c "import hashlib; import sys; m = hashlib.sha1(); m.update(sys.stdin.read()); n = hashlib.sha1(); n.update(m.digest()) ; print('*' + n.hexdigest().upper())" |
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
// ==UserScript== | |
// @name Auto Select Private Visibility for Google Calendar Items | |
// @namespace http://cs.cementhorizon.com | |
// @description Auto Select Private Visibility for Google Calendar Items | |
// @include https://www.google.com/calendar/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Title Goes Here</title> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> |