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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCf+eR/l9PM67BG/7Ak7HZThO09cGDuBPP/9CSdjmn2HHg5OCTVJ56rWo83Fojy3v/HvksdPzdBJ1hhE0b42FazE4dbN4UoFc3UhcqzvJ/l8IuaQRsexN4ZqNcaUf4p1CNGWMXQfbqHsJkVhnmdW0KMusbV8yfzZSWuJrk4SKGZlxeMGhZBhb4ROV4ZKS/NTmKchrvVdonmb7TrPF8imP9yn3SSPi58ZRsam4icP8BUAFuD5q4DwTVmfs0P2n2Caza6ODb+XSVITzEah8KRlNWW7m9Ni5qG+n00oJqolbtmXX9a9FKu4x9VJ7JgozaYiD4xX4n4nJcKN0IAsPPd94bt [email protected] |
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
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
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
require "curb" | |
class ExpandUrl | |
def self.expand short_url | |
c = Curl::Easy.new(short_url) {|req| req.follow_location = true} | |
c.perform | |
puts c.last_effective_url | |
end | |
end |
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
#!/bin/sh | |
if [ `which perl` = "/usr/bin/perl" ]; then | |
echo -n -e "\e[1;31mUSING SYSTEM PERL OK? [y/n]\e[m: " | |
read ANSWER | |
if [ "$ANSWER" != "y" ]; then | |
exit 255 | |
fi | |
PERL_CPANM_OPT="$PERL_CPANM_OPT --sudo" | |
fi |
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
#!/bin/bash | |
# Authorize TCP, SSH & ICMP for default Security Group | |
#ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0 | |
#ec2-authorize default -P tcp -p 22 -s 0.0.0.0/0 | |
# The Static IP Address for this instance: | |
IP_ADDRESS=$(cat ~/.ec2/ip_address) | |
# Create new t1.micro instance using ami-cef405a7 (64 bit Ubuntu Server 10.10 Maverick Meerkat) |
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
lrange = <<lua | |
local videos_to_fetch = 0 | |
if tonumber(ARGV[1]) > 0 then | |
videos_to_fetch = ARGV[1] - 1 | |
end | |
local videos_in_channel = redis.call("lrange", KEYS[1], 0, videos_to_fetch) | |
return videos_in_channel | |
lua | |
# assuming redis-server runs at localhost:6379 |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDab5G+R0kZchKB14H1ZYWWd6cteyA7M28f2RRdXRvoB7cRtiQVJG+fvBULE74f2SIYcjzSYLZD2jy9DCWBQbyPPIn6ZyA+DDaZKxpoKefRYFr6xTXcqwwTi8w8O3o5aGLKNGnowOo2TxUlkqcChTkNDiAVLQBXS8g12KjOeXcBMzZGvMwYDriqPJFCSz2BVZbgo5aouKc6xFBwv5pexsadlw9AaJYlGM7yQ6fwUIIBYSx7Dsxx44zAzUobVsgBpyVYHBySZ2aWIscR8nzDVikM4xA+n6tvJXlpv9bd6MNOQq6VwOxNBmBtdptTtQ6yTYnOoEnucct/qQBoJRROqQ5B [email protected] |
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 ruby | |
# Usage: | |
# replier.rb <pass access token here> | |
# access_token="your access token goes here" replier.rb | |
# | |
# If your access_token is expired, you can get a 400 bad request exception. Go get a fresh access_token in that case. | |
require 'rest-client' | |
require 'json' | |
require 'time' |
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
#hincrby & hget | |
r.hincrby "c", "e", 10 | |
r.hincrby "c", "e", -10 | |
r.hget "c", "e" | |
r.hget "c", "e", "counters" #counters is the default type | |
#hset & hget | |
r.hset "a", "b", "hello_world" |
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
#add these lines to the end of this file: /etc/apt/sources.list | |
deb http://www.apache.org/dist/cassandra/debian 20x main | |
deb-src http://www.apache.org/dist/cassandra/debian 20x main | |
#and then update apt-get and install cassandra | |
sudo apt-get update | |
sudo apt-get install cassandra | |
#start cassandra | |
sudo cassandra |
OlderNewer