This file contains hidden or 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 authorised? | |
true | |
end |
This file contains hidden or 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
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.2; | |
passenger_ruby /home/youni/.rvm/wrappers/ruby-1.9.2-p0/ruby; |
This file contains hidden or 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
# user deploy; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
pid /var/run/nginx.pid; | |
This file contains hidden or 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
class TimetablesController < ApplicationController | |
# FILTERS | |
before_filter :authenticate_user!, :except => [:show, :about] | |
# SHOW | |
def show | |
if user_signed_in? && current_user.timetable | |
@timetable_items = current_user.timetable | |
elsif user_signed_in? && !current_user.timetable || !user_signed_in? |
This file contains hidden or 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
create_table "timetable_events", :force => true do |t| | |
t.integer "timetable_item_id" | |
t.integer "timetable_event_type_id" | |
t.string "location" | |
t.string "code" | |
t.time "start_time" | |
t.integer "day" | |
t.decimal "length", :precision => 3, :scale => 1 | |
t.text "notes" | |
t.datetime "created_at" |
This file contains hidden or 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
// I have included a few steps in here to show the flow I normally do to get things working. | |
// Keep in mind I'm still a massive noob so there may be a better way to do all of this :/ | |
// ... | |
// Class definition and imports | |
// STEP 1: Declare vars in the controller @interface | |
@interface MapViewController : UIViewController <MKMapViewDelegate, UISearchBarDelegate> { | |
// ... |
This file contains hidden or 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 | |
# | |
# Originally written by http://redartisan.com/tags/csv | |
# Added and minor changes by Gavin Laking | |
# Rewritten by Andrew Bennett for Ruby 1.9 | |
# | |
# Usage: ruby csv_to_fixture.rb file.csv [--json] | |
# | |
# "id","name","mime_type","extensions","icon_url" | |
# "1","unknown","unknown/unknown","||","/images/icon/file_unknown.gif" |