Skip to content

Instantly share code, notes, and snippets.

View superacidjax's full-sized avatar

Brian Dear superacidjax

View GitHub Profile
@superacidjax
superacidjax / gist:9742583
Created March 24, 2014 15:33
Carrierwave config example
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => 'xxx', # required
:aws_secret_access_key => 'yyy', # required
:region => 'eu-west-1', # optional, defaults to 'us-east-1'
:host => 's3.example.com', # optional, defaults to nil
:endpoint => 'https://s3.example.com:8080' # optional, defaults to nil
}
config.fog_directory = 'name_of_directory' # required
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
" Leader
let mapleader = " "
set t_Co=256
set backspace=2 "
let &colorcolumn="80"
set nocompatible " Use Vim settings, rather then Vi settings
set nobackup
set nowritebackup
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
@superacidjax
superacidjax / vim_cheatsheet
Created November 30, 2014 21:34
Basic Vim Cheat Sheet
VIM Cheatsheet
Text Entry
a Append text following current cursor position
A Append text to the end of current line
i Insert text before the current cursor position
I Insert text at the beginning of the cursor line
o Open up a new line following the current line and add text there
O Open up a new line in front of the current line and add text there
@superacidjax
superacidjax / the_install.sh
Created November 18, 2011 12:43 — forked from therubymug/the_install.sh
Ruby development environment for OS X (Lion)
#!/usr/bin/env sh
# Title: Ruby development environment for OS X (Lion)
# Author: Rogelio J. Samour
# Warning:
# While it is unlikely any code below might damage your system,
# it’s always a good idea to back up everything that matters to you
# before running this script! Just in case. I am not responsible for
# anything that may result from running this script. Proceed at
# your own risk.
module ClearEyes
module ViewHelpers
attr_accessor :image, :options
def r_image( pixel_ratio )
insert_on = -File.extname(@image).size-1
image_tag(@image.insert(insert_on, "@#{pixel_ratio}x"), @options)
end
#signup.container.main
.mainInner
%h1 Sign Up
.description
%p Fill out the form below and get started with your free trial today. You'll have 5 video interviews available.
%p If you'd like to continue using the platform after your trial expires, simply upgrade your account and none of your information will be lost.
%p
By clicking Get Started, you agree to the
= link_to("Terms of Service", terms_support_path)
and the
@superacidjax
superacidjax / Cucumber Plain Text Feature.tmLanguage
Created July 31, 2012 01:39 — forked from unixmonkey/Cucumber Plain Text Feature.tmLanguage
Cucumber Language definition file for TextMate; modified to work with Sublime Text 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>feature</string>
</array>
<key>firstLineMatch</key>
<string>기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)</string>
@superacidjax
superacidjax / gist:3251655
Created August 3, 2012 21:19
admin user_controller test
17: test "resend invitation" do
18: @invitation = FactoryGirl.create(:invitation)
19: @user = FactoryGirl.create(:user)
20: #@department = FactoryGirl.create(:department)
21: @user.make_admin_of(@invitation.company)
22: sign_in(@user)
=> 23: binding.pry
24: assert Invitation.find_by_id(@invitation.id), "Invitation should be present"
25:
26: assert_difference 'ActionMailer::Base.deliveries.size', +1 do
From: /Users/brian/Development/take_the_interview/take_the_interview/lib/xls_export.rb @ line 61 XlsExport#get_xls:
56: users.each do |user|
57: this_rating = all_criterion_ratings[user_interview.id][user.id][interview_criterion.id]
58: row.push this_rating ? this_rating : "-"
59: end
60: source = criterion_rating_nouser[user_interview.id][interview_criterion.id]
=> 61: binding.pry
62: sum = source.sum
63: row.push sum