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
# n: Brandon Ruschill | |
# c: github.com/bruschill | |
# t: @bruschill | |
# BASICS (command mode) | |
# never ever use the arrow keys. ever | |
# | |
# k | |
# h l | |
# j |
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
def vim_gist | |
1 | |
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
#regenerate conf | |
bundle exec rake ts:conf | |
#rebuild indexes | |
bundle exec rake ts:rebuild |
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
factory :user_with_tasks, :parent => :base_user do |user| | |
user.after(:create) do |u| | |
u.tasks = FactoryGirl.create(:task, :user => u) | |
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
<a class="tf_upfront_badge" href="http://www.thefind.com/store/about-goodsmiths" title="TheFind Upfront" style="text-decoration:none;"><b>Goodsmiths</b> is <u>Upfront</u></a> | |
<script type="text/javascript"> | |
(function() { | |
var upfront = document.createElement('SCRIPT'); upfront.type = "text/javascript"; upfront.async = true; | |
upfront.src = document.location.protocol + "//upfront.thefind.com/scripts/main/utils-init-ajaxlib/upfront-badgeinit.js"; | |
upfront.text = "thefind.upfront.init('tf_upfront_badge', '089a0f679a709de734d408d2bb3073b6')"; | |
document.getElementsByTagName('HEAD')[0].appendChild(upfront); | |
})(); | |
</script> |
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
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
require 'capistrano/deploy' | |
require 'capistrano/rbenv' | |
require 'capistrano/bundler' | |
require 'capistrano/rails/migrations' | |
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined. | |
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } |
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
'use strict'; | |
var rpgtd = angular.module('rpgtd', []); |
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
module Dwolla | |
class Pin | |
def self.decrypt(pin, iv) | |
return nil unless pin.present? && iv.present? | |
decipher = OpenSSL::Cipher::AES256.new(:CBC) | |
decipher.decrypt | |
decipher.key = Rails.application.secrets.secret_key_base | |
# convert iv from utf-8 back to ascii-8bit |
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
#### TESTING SCENARIOS | |
### GENERAL | |
# When it comes to testing you'll want to write tests | |
# for every outcome of anything (method call, object instantiation, | |
# redirect, etc.) to verify that what you expect to happen actually happens, | |
# regardless of how rarely you think it may happen. | |
# | |
# Ultimately what this boils down to is testing: | |
# - every condition of a conditional (if/else, case, etc.) | |
# - method |
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 | |
puts ((Dir.glob(File.join('/', '**', '*')).select{|file| File.file?(file)}.count) % 5) + 1 |
OlderNewer