Set your .gemrc
to not install docs by default
# ~/.gemrc
gem: --no-rdoc --no-ri
install: --no-rdoc --no-ri
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Feed Helper | |
* | |
* @package CodeIgniter | |
* @subpackage Helpers | |
* @category Helpers | |
* | |
* @author Jack Boberg | |
* @copyright ( coded by hand ) 2010-03 |
$ = jQuery | |
pluginName = 'test' | |
methods = | |
init: (opts)-> | |
defaults = | |
foo: 'bar' | |
bar: 'foo' | |
options = $.extend defaults, opts | |
return @.each -> |
# lib/tasks/helper_task.rake | |
namespace :helper do | |
desc 'Access helper methods in rake tasks' | |
task :test => :environment do | |
include ActionView::Helpers | |
include ApplicationHelper | |
puts display_amount 2500 #=> "$2,500" | |
end | |
end |
@cache_dir = 'lib/assets/' | |
def hash_from_cache | |
xml = @cache_dir + 'published.xml' | |
cache = @cache_dir + 'published.cache.rb' | |
if ! File.exists?(cache) | |
data = File.read xml | |
hash = Hash.from_xml data | |
File.open(cache, "wb") {|io| Marshal.dump(hash, io)} |
def template(from, to) | |
erb = File.read(File.expand_path("../../templates/#{from}", __FILE__)) | |
put ERB.new(erb).result(binding), to | |
end | |
def set_default(name, *args, &block) | |
set(name, *args, &block) unless exists?(name) | |
end | |
def remote_file_exists?(path) |
var mongoose = require('mongoose'); | |
var ContactSchema = require('./contact'); | |
var UserSchema = new mongoose.Schema({ | |
email: {type: String}, | |
name: {type: String}, | |
//oauth: {}, | |
profile: {type: Object}, | |
contacts: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Contact' }] | |
}); |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
system "RAILS_ENV=development bundle exec rake assets:precompile" | |
system "rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}" | |
system "RAILS_ENV=development bundle exec rake assets:clean" | |
end | |
task :update_asset_mtimes do |
(function() { | |
Backtrace = {}; | |
Backtrace.Router = (function() { | |
Router.prototype.optionalParam = /\((.*?)\)/g; | |
Router.prototype.namedParam = /:\w+/g; |
#= require_tree ./ | |
class App.Routers.Common extends App.Routers.Base | |
routes: | |
'*': 'global' | |
# --------------------------------------------------------------------- | |
global: (r)-> | |
$(window).load @windowLoad |