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
class FixBorders | |
def go_horse! | |
all_images = load_image_list | |
all_images.each do |image| | |
# download original | |
# convert different sizes | |
# upload to S3 | |
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
# cat pwd.txt | cut -d : -f 2 | sort | uniq -c | sort -f -r | |
freq password | |
1270 315475 | |
487 123456 | |
176 123456789 | |
68 102030 | |
59 123 | |
50 12345 | |
44 1234 |
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu-precise64-chef" | |
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.4.box" | |
config.vm.network :private_network, ip: "10.0.0.10" | |
config.vm.hostname = "detroit" | |
config.vm.provision :chef_solo do |chef| |
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
# Executes nginx recipe. | |
include_recipe "detroit::nginx" | |
# Creates deploy directory with correct permissions. | |
directory "/data/www" do | |
owner "nginx" | |
group "nginx" | |
mode "755" | |
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
worker_processes 3; | |
http { | |
server { | |
listen 80; | |
location / { | |
root /data/www; | |
} | |
} |
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu-precise64" | |
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box" | |
# Sets the ip we'll use to access the box | |
config.vm.network :private_network, ip: "10.0.0.10" | |
config.vm.hostname = "detroit" |
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu-precise64" | |
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box" | |
# Sets the ip we'll use to access the box | |
config.vm.network :private_network, ip: "10.0.0.10" | |
config.vm.hostname = "detroit" |
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
# apt-get update; could be optimized to not run every time | |
bash "updates packages" do | |
code "apt-get update" | |
end | |
# apt-get install git | |
package "git" | |
# Executes nginx recipe. | |
include_recipe "detroit::nginx" |
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
worker_processes <%= node[:nginx][:worker_processes] %>; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 80; |
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 | |
require 'scraperwiki' | |
require 'rubygems' | |
require 'active_support/time' | |
require 'nokogiri' | |
class Scraper |