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 happybase, sys, os, string | |
# VARIABLES | |
# HBase Thrift server to connect to. Leave blank for localhost | |
server = "" | |
# Connect to server | |
c = happybase.Connection(server) | |
# Get the full list of tables |
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 happybase, sys, os, string | |
# VARIABLES | |
# Output directory for CSV files | |
outputDir = "/mnt" | |
# HBase Thrift server to connect to. Leave blank for localhost | |
server = "" | |
# Connect to server | |
c = happybase.Connection(server) |
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
<?php | |
// Length of each line | |
$length = 40; | |
// Open up a file | |
$file = fopen("test.txt", "w"); | |
// Generate 10,000 strings | |
for ($iii=0; $iii<=10000; $iii++) { |
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
# Variables | |
VOLUME=/dev/sdf | |
DIRECTORY=/var/www/html/ | |
USER=apache | |
GROUP=apache | |
# Commands | |
mkfs -t ext4 $VOLUME | |
mount $VOLUME $DIRECTORY | |
echo "$VOLUME $DIRECTORY ext4 noatime 0 0" | sudo tee -a /etc/fstab |
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
# Author: Suman | |
# Import boto's layer2 | |
import boto.glacier.layer2 | |
# Various variables for AWS creds, vault name, local file name | |
awsAccess = "AKIAxxxx" | |
awsSecret = "YouRSecRetKeY" | |
vaultName = "YourVaultName" | |
fileName = "LocalFileName" |
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/python | |
# | |
# Start new EC2 instances | |
# | |
import boto, sys, time | |
print "Please enter your AWS credentials below." | |
# AWS credentials |
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/python | |
# | |
# Auto-start and stop EC2 instances | |
# | |
import boto, datetime, sys | |
from time import gmtime, strftime, sleep | |
# AWS credentials | |
aws_key = "AKIAxxx" | |
aws_secret = "abcd" |
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, datetime, time | |
# Enter your AWS credentials | |
aws_key = "YOUR_AWS_KEY" | |
aws_secret = "YOUR_AWS_SECRET" | |
# Details of instance & time range you want to find spot prices for | |
instanceType = 'm1.xlarge' | |
startTime = '2012-07-01T21:14:45.000Z' | |
endTime = '2012-07-30T23:14:45.000Z' |
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
# Change to sudo | |
sudo su | |
# Export the username you want to create | |
export USERNAME=name | |
adduser $USERNAME | |
cd /home/$USERNAME | |
# Create the SSH keys | |
mkdir .ssh |
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
################# | |
# Update packages | |
################# | |
sudo yum -y update | |
sudo yum -y upgrade | |
######################## | |
# Install the Oracle JDK | |
######################## |
NewerOlder