- Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
- rabl - General ruby templating with json, bson, xml, plist and msgpack support
- Thin - Very fast and lightweight Ruby web server
- Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
- SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
- Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
- [factory_girl](h
This file contains 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
# ember router | |
App.Router.reopen | |
location: 'history' | |
rootURL: '/u/' | |
App.Router.map -> | |
@route 'login' | |
@resource('documents', path: '/') | |
@route('new') |
This file contains 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
#### Getting the following error #### | |
# Error while loading route: undefined | |
# Store | |
# Override the default adapter with the `DS.ActiveModelAdapter` which | |
# is built to work nicely with the ActiveModel::Serializers gem. | |
App.ApplicationAdapter = DS.ActiveModelAdapter.extend() |
This file contains 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
undefined local variable or method `session' for #<Devise::FailureApp:0x00000005a421d0> | |
devise (3.2.2) lib/devise/controllers/store_location.rb:38:in `store_location_for' | |
devise (3.2.2) lib/devise/failure_app.rb:194:in `store_location!' | |
devise (3.2.2) lib/devise/failure_app.rb:57:in `redirect' | |
devise (3.2.2) lib/devise/failure_app.rb:39:in `respond' | |
actionpack (3.2.6) lib/abstract_controller/base.rb:167:in `process_action' | |
actionpack (3.2.6) lib/abstract_controller/base.rb:121:in `process' | |
actionpack (3.2.6) lib/action_controller/metal.rb:203:in `dispatch' |
This file contains 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
module.exports = (grunt) -> | |
grunt.loadNpmTasks('grunt-contrib-watch') | |
grunt.loadNpmTasks('grunt-contrib-concat') | |
grunt.loadNpmTasks('grunt-contrib-coffee') | |
grunt.loadNpmTasks('grunt-sass') | |
grunt.initConfig | |
pkg: grunt.file.readJSON('package.json') |
This file contains 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 AuthenticationsController < ApplicationController | |
# This is the callback method from OmniAuth's GitHub authentication. | |
# following http://railscasts.com/episodes/236-omniauth-part-2 | |
def create | |
omniauth = request.env["omniauth.auth"] | |
authentication = Authentication.find_by_provider_and_uid(omniauth['provider'], omniauth['uid']) | |
if authentication | |
sign_in_and_redirect(:user, authentication.user) | |
end | |
This file contains 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 test | |
print "hello" | |
end |
This file contains 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
# Admin CodesController | |
class Admin::CodesController < AdminController | |
def index | |
end | |
def show | |
@code = Code.find(params[:id]) | |
end | |
def edit | |
@code = Code.find(params[:id]) |
This file contains 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
# model name is "Code" | |
# using acts_as_taggable | |
# takes in URL like domain.com/code/tags/first-tag+second-tag | |
# variable foo splits the string, sorts alphabetically, and rejoins the string | |
# if the current params don't equal the sorted params, redirect to | |
# code_tags_path plus the sorted string | |
# codes_controller.rb |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder