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
| require 'rubygems' | |
| require 'bundler' | |
| Bundler.require | |
| require './application' | |
| namespace :assets do | |
| desc 'compile assets' | |
| task :compile => [:compile_js, :compile_css] do | |
| 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
| require 'mogli' | |
| module FacebookIntegrationHelpers | |
| shared_context "with unconnected facebook user" do | |
| let(:fb_user) { create_test_user(installed: false) } | |
| after { fb_user.destroy } | |
| end | |
| def app_client | |
| Mogli::AppClient.new(AppConfig.facebook.access_token, AppConfig.facebook.app_id) |
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
| #!/bin/bash | |
| USER="username" | |
| HOST=$1 | |
| BRIDGE=FALSE | |
| while getopts "u:h:b": OPT; do | |
| # echo "$OPT=$OPTARG" | |
| case ${OPT} in | |
| u) USER=${OPTARG};; | |
| b) BRIDGE=TRUE;; |
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
| set cursorline | |
| set hlsearch | |
| set number | |
| set ruler | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| syntax on |
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
| $('[data-nested="add"]').live 'click', (e)-> | |
| e.preventDefault() | |
| association = $(this).data('association') | |
| fields = $(this).data('fields') | |
| target = $("[data-association='#{association}_fields']") | |
| regexp = new RegExp('new_' + association, 'g'); | |
| new_id = new Date().getTime(); | |
| fields = fields.replace(regexp, "new_" + new_id); | |
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 ActionDispatch::Routing::Mapper | |
| def localize_and_scope_for(locales, options = {}, &block) | |
| scoped_locales = locales - Array(options[:skip_scope]) | |
| localized(locales) do | |
| locale_regexp = Regexp.new(scoped_locales.join('|')) | |
| scope("/:i18n_locale", :constraints => {:i18n_locale => locale_regexp}) do | |
| yield | |
| end | |
| yield if options[:skip_scope] |
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
| # Generators | |
| config.generators do |generator| | |
| generator.helper false | |
| generator.stylesheets false | |
| generator.javascripts false | |
| generator.controllers true | |
| generator.template_engine :haml | |
| generator.integration_tool :rspec | |
| generator.test_framework :rspec, controller_specs: false, | |
| view_specs: false, |
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
| server { | |
| # output compression saves bandwidth | |
| gzip on; | |
| gzip_http_version 1.1; | |
| gzip_vary on; | |
| gzip_comp_level 6; | |
| gzip_proxied any; | |
| gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
| # make sure gzip does not lose large gzipped js or css files |