Skip to content

Instantly share code, notes, and snippets.

View superacidjax's full-sized avatar

Brian Dear superacidjax

View GitHub Profile
@superacidjax
superacidjax / the_install.sh
Created November 8, 2011 07:17 — 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.
@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
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
user_interviews.each do |user_interview|
sheet.row(current_row).default_format = bold_format
sheet.row(current_row).concat %w{Candidate Assessment\ Criteria Weight\ %}
users.each{|user| sheet.row(current_row).push user.name}
sheet.row(current_row).push "Total Score", "Average Score"
current_row += 1
first_criteria = true
interview.interview_criteria.order(:text).each do |interview_criterion|
row = sheet.row(current_row)
if first_criteria
require 'uri'
require 'cgi'
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
module WithinHelpers
def with_scope(locator)
locator ? within(locator) { yield } : yield
end
end
World(WithinHelpers)