chruby can be used with [pow] to select a specific Ruby per project, or system-wide.
To set a default Ruby for all pow apps, puts the following in
~/.powconfig
.
namespace :assets do | |
task :check do | |
root_dir = File.join(File.dirname(__FILE__),"..","..") | |
assets_last_modified_at = Dir["#{root_dir}/app/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
assets_last_compiled_at = Dir["#{root_dir}/public/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
if assets_last_modified_at > assets_last_compiled_at | |
fail "Assets need to precompiled; last asset modified at #{assets_last_modified_at}" | |
end | |
end |
- classes can be no longer than 100 lines | |
- methods can be no longer than 5 lines | |
- methods cannot accept more than 4 parameters (no gigantic hashes) | |
- controllers cannot instantiate more than 1 object | |
- views cannot know about more than 1 instance variable | |
- views should only send messages to that variable (no Demeter violations) | |
- rules are meant to be broken if by breaking them you produce better code |
class Dictionary | |
def initialize | |
@dictionary = {} | |
end | |
def entries | |
@dictionary | |
end | |
def add (entry) |
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr | |
;; Copyright (C) Alex Ott | |
;; | |
;; Author: Alex Ott <[email protected]> | |
;; Keywords: cedet, C++, Java | |
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml) | |
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below) |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
{-# LANGUAGE TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses, NoMonomorphismRestriction #-} | |
-- Ty Levad - [email protected] | |
-- xmonad.hs | |
-- Core Modules | |
import System.Exit | |
import XMonad hiding ((|||)) | |
import qualified XMonad.StackSet as W | |
-- Action Modules |
# file mood.rb | |
Mood = Struc.new(:happy) | |
# file user.rb | |
class User | |
serialize mood, Mood | |
def mood=(attr={}) |