Skip to content

Instantly share code, notes, and snippets.

View customer_refund_deposit_list.rb
module NetSuite
module Records
class CustomerRefundDepositList
include Support::Fields
include Support::Records
include Namespaces::TranCust
fields :amount, :apply, :currency, :deposit_date, :doc, :line, :ref_num, :remaining, :total, :replace_all
def initialize(attributes = {})
View zap-imoveis.rb
#!/usr/bin/env ruby
require 'scraperwiki'
require 'rubygems'
require 'active_support/time'
require 'nokogiri'
class Scraper
View nginx.conf.erb
worker_processes <%= node[:nginx][:worker_processes] %>;
events {
worker_connections 1024;
}
http {
server {
listen 80;
View default.rb
# 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"
View Vagrantfile
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"
View Vagrantfile
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"
View nginx.conf.erb
worker_processes 3;
http {
server {
listen 80;
location / {
root /data/www;
}
}
View default.rb
# Executes nginx recipe.
include_recipe "detroit::nginx"
# Creates deploy directory with correct permissions.
directory "/data/www" do
owner "nginx"
group "nginx"
mode "755"
end
View Vagrantfile
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|
@buccolo
buccolo / gist:2640901
Created May 9, 2012
Password frequency from latest Twitter hacked accounts
View gist:2640901
# 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