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
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |
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
| if Rails.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel) | |
| # Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
| # | |
| # def [](k) | |
| # super(@names[k] ||= @names[k.downcase]) | |
| # end | |
| # | |
| module Rack |
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
| $(function() { | |
| // Depends on: jQuery, jQuery UI core & widgets (for the autocomplete method) | |
| // Assumes you're already including the FB JS SDK asynchronously... | |
| window.fbAsyncInit = function() { | |
| FB.init({ | |
| appId : 'xxxxxxxxxxxxxxxxxx', // App ID | |
| status : true, // check login status |
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
| # this script will migrate and reorganize a Paperclip attachments directory to utilize :id_partition | |
| # Quickly put together by mario@orbitalvoice.com | |
| # Assumes that your images to migrate < 1 000 000 | |
| # | |
| # Usage: ruby paperclip_partition_id_migrate.rb TARGET_DIR=/path/to/attachments/:class/:style | |
| require '/opt/ruby-enterprise/lib/ruby/1.8/fileutils.rb' | |
| def add_leading_zeros(i) |
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
| " ------ | |
| " Vundle | |
| " ------ | |
| set nocompatible " be iMproved | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() |