gem install rails
rails new my_app -T
| function callWatcher(fn) { | |
| var called = false; | |
| return function() { | |
| if(!called) { | |
| called = true; | |
| } | |
| return !called; | |
| }; | |
| } |
| from flask import Flask | |
| from flask_sqlalchemy import SQLAlchemy | |
| from template_app import settings | |
| from template_app.core import setup_routing | |
| # setup application | |
| app = Flask('template_app') | |
| app.config.from_object(settings) |
| doctype 5 | |
| html | |
| head | |
| meta(charset='utf-8') | |
| title= title | |
| block css | |
| body | |
| block content | |
| block js |
| gem 'unicorn' | |
| gem_group :development, :test do | |
| gem 'rspec-rails' | |
| gem 'ffaker' | |
| end | |
| gem_group :development do | |
| gem 'guard' | |
| gem 'rb-inotify', require: false |
| exports[key] = value for key, value of { | |
| run : run | |
| document : document | |
| parse : parse | |
| resolveSource : resolveSource | |
| version : version | |
| defaults : defaults | |
| languages : languages | |
| } |
| class Customer < AR::Base | |
| authorization_states = Proc.new do | |
| event :start_authorizing do | |
| transition all => :authorizing | |
| end | |
| event :finish_authorizing do | |
| transition :authorizing => :authorized | |
| end |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| module EFax | |
| class QueryStatus | |
| RESOURCE_NOT_FOUND = 2 | |
| end | |
| class OutboundStatusResponse | |
| alias_method :original_initialize, :initialize | |
| def initialize(response) |
| Started GET "/patients/324383/pharmacies/search?search%5Bnew_pharmacy%5D=true&search%5Bpatient_id%5D=324383&search%5Bprescription_id%5D=20902571" for 173.24.225.166 at 2012-01-31 18:45:31 +0000 | |
| Processing by PharmaciesController#search as */* | |
| Parameters: {"search"=>{"new_pharmacy"=>"true", "patient_id"=>"324383", "prescription_id"=>"20902571"}, "patient_id"=>"324383"} | |
| User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = 422 LIMIT 1 | |
| CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 422 LIMIT 1 | |
| (0.3ms) BEGIN | |
| (0.5ms) UPDATE "users" SET "last_request_at" = '2012-01-31 18:45:31.894869', "perishable_token" = '7KVh2qvR9hLREHoss8ei', "updated_at" = '2012-01-31 18:45:31.896128' WHERE "users"."id" = 422 | |
| (2.8ms) COMMIT | |
| Pharmacy Load (1.9ms) SELECT "pharmacies".* FROM "pharmacies" INNER JOIN "prescriptions" ON "prescriptions"."pharmacy_id" = "pharmacies"."id" INNER JOIN "medications" ON "medications"."id" = "prescriptions"."medication_id" INNER JOIN "patients" ON "p |