Skip to content

Instantly share code, notes, and snippets.

View farshidce's full-sized avatar

Farshid Ghods farshidce

  • LinkedIn
  • San Francisco
View GitHub Profile
import sys
import os
import uuid
sys.path.append(".")
sys.path.append("lib")
from mc_bin_client import MemcachedClient
from memcached.helper.data_helper import MemcachedClientHelper
@farshidce
farshidce / ec2-cf-ini-1
Created November 17, 2011 07:22
ec2-cf-ini-1
[global]
username:root
ssh_key:/var/lib/jenkins/key.pem
port:8091
[servers]
1:@IP1@
1:@IP2@
3:@IP3@
@farshidce
farshidce / cf1.json
Created November 16, 2011 00:49
cf1
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template EC2InstanceSample: Create an Amazon EC2 instance running the Amazon Linux AMI. The AMI is chosen based on the region in which the stack is run. This example uses the default security group, so to SSH to the new instance using the KeyPair you enter, you will need to have port 22 open in your default security group. **WARNING** This template an Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type" : "String"
}
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template EC2InstanceSample: Create an Amazon EC2 instance running the Amazon Linux AMI. The AMI is chosen based on the region in which the stack is run. This example uses the default security group, so to SSH to the new instance using the KeyPair you enter, you will need to have port 22 open in your default security group. **WARNING** This template an Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type" : "String"
}
@farshidce
farshidce / gist:1093217
Created July 19, 2011 17:39
hash-detail-and-print-vbucket-mismatch
import commands
ips = ["10.1.5.38","10.1.5.53","10.1.5.54","10.1.5.57","10.1.5.58","10.1.5.59"]
def mapit(stuff):
rows = stuff[1].split("\n")
map = {}
for row in rows:
#get bucket id
vid = row[row.find("_")+1:row.find(":")]