Skip to content

Instantly share code, notes, and snippets.

View victorhazbunanuff's full-sized avatar

victor hazbun anuff victorhazbunanuff

  • koombea
  • barranquilla
View GitHub Profile
@victorhazbunanuff
victorhazbunanuff / account_spec.rb
Created June 25, 2013 22:13
test for account deletion (model spec)
describe "#destroy_pendings" do
before(:each) do
@account1 = FactoryGirl.create(:account, domain: 'foobar', admin_attributes: valid_user, plan: FactoryGirl.create(:subscription_plan, :basic))
@account2 = FactoryGirl.create(:account, domain: 'foobars', admin_attributes: valid_user, plan: FactoryGirl.create(:subscription_plan, :basic))
@account1.delayed_deletion
end
context "when there are no accounts to be permanent deleted" do
it "should not delete any account" do
expect {
@victorhazbunanuff
victorhazbunanuff / gist:3991453
Created November 1, 2012 03:26 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@victorhazbunanuff
victorhazbunanuff / peepcode.rb
Created July 11, 2012 03:16 — forked from gertig/peepcode.rb
A script to download all Peepcode screencasts with ruby & wget (supports resume)
require 'mechanize'
@username = 'user@domain.com'
@password = 'hi2u'
@download_path = File.expand_path 'downloads'
@wget_cookie = File.expand_path(File.dirname(__FILE__)) + '/wget-cookies.txt'
unless File.directory? @download_path
puts "@{download_path} doesn't exist!"
exit
@victorhazbunanuff
victorhazbunanuff / das_download.rb
Created June 6, 2012 19:34 — forked from kalbasit/das_download.rb
Script to download all Destroy All Software screencasts, account needed
#! /usr/bin/env ruby
# usage:
# $ das_download.rb email password [download_directory]
require 'mechanize'
# gem 'mechanize-progressbar'
email = ARGV[0] or raise('Please provide the email address for your account')
password = ARGV[1] or raise('Please provide the password for your account')
path = (ARGV[2] || './').gsub /\//,''