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
#!/usr/bin/env ruby | |
mode_identifier = `system_profiler SPHardwareDataType | awk '/Model Identifier:/ {print $3}'` | |
`open http://www.everymac.com/ultimate-mac-lookup/?search_keywords=#{mode_identifier}` |
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 | |
def what_quarter_now | |
month = Time.now.strftime("%-m") | |
if month == 6 || 7 || 8 | |
puts "1Q" | |
elsif month == 9 || 10 || 11 | |
puts "2Q" | |
elsif month == 12 || 1 || 2 |
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 |
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.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
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
#!/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
#!/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
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 |