Skip to content

Instantly share code, notes, and snippets.

View austinbv's full-sized avatar
🎯
Focusing

Austin austinbv

🎯
Focusing
View GitHub Profile
@austinbv
austinbv / gist:3112678
Created July 14, 2012 18:55 — forked from anonymous/gist:3112657
UserPasswordResetsController
require 'spec_helper'
describe UserPasswordResetsController do
describe 'POST #create' do
before(:each) do
@user = create(:user, customer_id: 1, email: '[email protected]')
end
let(:make_valid_request) { post :create, { email: '[email protected]' } }
@austinbv
austinbv / ERROR
Created December 22, 2011 05:57 — forked from anonymous/ERROR
NoMethodError in Devices#locations
Showing /home/russellpruitt/projects/inventory/app/views/devices/locations.html.erb where line #3 raised:
undefined method `device' for #<ActiveRecord::Relation:0xa6d4fd4>
Extracted source (around line #3):
1: <h1>Devices for: <%= @location.location_name %></h1>
2:
@austinbv
austinbv / Deadlock.java
Created December 8, 2011 01:29 — forked from thelittlemango/Deadlock.java
Deadlock Simulation
import java.util.*;
//------------------------------------------------------------------
// Program by: Sam Fader and Bell Lopez
// The purpose of this program is to determine if processes are
// deadlocked or not.
// We pledge that this work is ours.
//-------------------------------------------------------------------
public class Deadlock {
@event = Event.new(@work_appointment)
Rails.logger.debug { " - - @event " + @event.to_json }
outputs : @event {"appt_id":7,"start":"2011-11-28T09:30:00Z","end":"2011-11-28T10:30:00Z"}
format.js { render :template => "admin/work_appointments/update" }
callme(
test(
morefunctions({
"param" : 1,
"param2" : 2
})
)
)