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
# Part of this borrowed from a jekyll deploy script from the jekyll author. | |
# This assumes sprockets and juicer which will combine your js modules and yui compress them respectively | |
BASE = File.dirname(__FILE__) | |
SRC = "#{BASE}/src" | |
SITE = "#{BASE}/site" | |
JSFILE = "javascript.js" | |
task :default => [:js,:build] |
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
<?php | |
** | |
* Implementation of hook_form(); | |
*/ | |
// THIS CODE DOESN'T WORK!!! well, i mean, it works, but id doesn't do what it is supposed to do... | |
function community_form(&$node, $form_state) { | |
$type = node_get_types('type', $node); | |
// We need to define form elements for the node's title and body. | |
$form['title'] = array( |
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
[serve]$ serve mockups | |
/usr/local/lib/ruby/gems/1.9.1/gems/compass-0.11.1/lib/compass/sass_extensions/functions/urls.rb:21:in `<module:Urls>': undefined method `declare' for Sass::Script::Functions:Module (NoMethodError) | |
from /usr/local/lib/ruby/gems/1.9.1/gems/compass-0.11.1/lib/compass/sass_extensions/functions/urls.rb:1:in `<top (required)>' | |
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require' | |
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/compass-0.11.1/lib/compass/sass_extensions/functions.rb:9:in `block in <top (required)>' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/compass-0.11.1/lib/compass/sass_extensions/functions.rb:5:in `each' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/compass-0.11.1/lib/compass/sass_extensions/functions.rb:5:in `<top (required)>' | |
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require' | |
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_ |
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 Playlist < ActiveRecord::Base | |
has_and_belongs_to_many :users | |
belongs_to :owner, class_name: "User", inverse_of: :owned_playlist | |
def editable_by?(user) | |
self.owner == user | |
end | |
end | |
class User < ActiveRecord::Base |
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
cd = "cd /Users/aaron/Sites/rails_app &&" | |
window do | |
pane do | |
pane "#{cd} bin/unicorn -p 3000" # I ran bundle install --binstubs | |
pane "#{cd} tail -f log/development.log" | |
pane "#{cd} bin/rails console" | |
end | |
tab do | |
run "#{cd} v." | |
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
(* | |
* Finder Open iTerm Here - v1.0.2 - 4/14/2011 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*) | |
tell application "Finder" |
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 TimespanForWorkRelationship | |
def initialize(worker, business) | |
# retrieves all work assignments for relationship | |
work_assignments = WorkAssignment.for(worker, business) | |
@months = create_related_months_for(work_assignments) | |
end | |
def create_related_months_for(work_assignments) | |
# logic to pull months out of workspans | |
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
cache: [GET /products/black_dress] miss | |
cache: [GET /products/green_dress] miss | |
cache: [GET /products/nutha_dress] miss | |
cache: [GET /products/purple_dress] miss | |
cache: [GET /products/wedding_dress] miss | |
cache: [GET /blog/2012/02/lovin-weddings] miss | |
cache: [GET /judge112233.php] miss | |
cache: [HEAD /] miss | |
cache: [GET /] miss | |
cache: [GET /proxyheader.php] miss |
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
.posts*data(id: post.id, url: post.permalink) | |
| ... | |
#=> <div class="post" data-id="123" data-url="/posts/kitten-tossing-banned-in-west-virginia" >...</div> |
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
server { | |
server_name example.com; | |
listen 80; | |
root /var/www/my_app/public; | |
passenger_enabled on; | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} |
OlderNewer