Skip to content

Instantly share code, notes, and snippets.

View metin's full-sized avatar

Metin Yorulmaz metin

View GitHub Profile
@metin
metin / gist:6615452
Created September 18, 2013 20:47
course
school = School.where(name: "General Assembly - New York City" ).last
pc.schools << school
course = Course.create(name: "Ruby on Rails")
school.school_courses << SchoolCourse.new(course:course, school: school, start_date: Date.today, end_date: 2.months.from_now, tuition: 12000, school_course_code: "ROR101" )
@metin
metin / gist:5620211
Created May 21, 2013 14:28
Query DJ Queue
Delayed::Job.where("last_error is not null").each do |j|
h = YAML.load(j.handler)
puts "Handler class"
puts h.class
puts "Handler object"
puts h.object
puts "Handler method"
puts h.method_name
puts "Last Error"
j.last_error.each_line{|i| puts i}
@metin
metin / makeapp.sh
Created December 1, 2012 04:06 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline