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 'twitter' | |
require 'pp' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV['CONSUMER_KEY'] | |
config.consumer_secret = ENV['CONSUMER_SECRET'] | |
config.access_token = ENV['ACCESS_TOKEN'] | |
config.access_token_secret = ENV['ACCESS_TOKEN_SECRET'] | |
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
require 'rubygems' | |
require 'bundler/setup' | |
require 'digitalocean' | |
require 'yaml' | |
@settings = YAML.load_file('./config/settings.yml') | |
Digitalocean.client_id = @settings['initialize']['client_id'] | |
Digitalocean.api_key = @settings['initialize']['api_key'] |
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
initialize: | |
client_id: XXXXXXXX | |
api_key: YYYYYYYY | |
create: | |
droplet_name: digio | |
region_id: 6 | |
size_id: 66 | |
image_id: 3445812 | |
ssh_key_id: ZZZZZZZZ |
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
box: wercker/ruby | |
build: | |
steps: | |
- script: | |
name: make .ssh directory | |
code: mkdir -p $HOME/.ssh | |
- create-file: | |
name: put ssh public key | |
filename: $HOME/.ssh/id_rsa.pub |
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 | |
yum update -y | |
resize2fs -p /dev/xvde | |
mkdir /mnt/store_vol | |
mount /dev/xvdf /mnt/store_vol/ | |
dd if=/dev/zero of=/mnt/store_vol/swapfile bs=1M count=1024 | |
mkswap /mnt/store_vol/swapfile | |
swapon /mnt/store_vol/swapfile |
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 | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 9200 -j ACCEPT | |
yum install -y java-1.7.0-openjdk wget unzip | |
rpm -ivh https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.noarch.rpm | |
chkconfig --add elasticsearch | |
yum install -y httpd |
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
on run argv | |
tell application "iTunes" | |
set command to first item of argv | |
if command = "play" then | |
play | |
else if command = "pause" then | |
pause | |
else if command = "next" then | |
next track | |
else if command = "prev" then |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "chef/ubuntu-12.04" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo apt-get update -y | |
sudo apt-get install -y curl |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "chef/centos-7.0" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo yum update -y | |
sudo yum install -y \ |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.define 'manager' do |manager| | |
manager.vm.box = "chef/centos-5.11" | |
manager.vm.network 'private_network', ip: '192.168.44.10' | |
manager.cache.scope = :box if Vagrant.has_plugin? 'vagrant-cachier' | |
manager.vm.provision "shell", inline: <<-SHELL | |
sudo hostname manager |
OlderNewer