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
name "development" | |
description "The development environment" | |
# Using a role because chef-solo doesn't support environments. | |
override_attributes "app_environment" => "development", | |
override_attributes "mysql" => { | |
:allow_remote_root => true, | |
:server_root_password => "", |
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
When accessing short URL links e.g. from Twitter.app, Safari's History records | |
only the shortened http://t.co/HASHKEY address. This makes it impossible to | |
find previously viewed pages. | |
The address bar is redirected to the expanded URI, but the redirected | |
destination is not recorded in history, and can't be found by page title, URL, | |
or indexed content. | |
Furthermore, reloading the destination page also doesn't add the page to | |
history. The only workaround is to copy the address to a NEW tab and load it |
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
def helper(&block) | |
content_tag(:div, &block) | |
end | |
# or ... | |
def helper(&block) | |
%(<div> | |
#{yield} | |
</div>} |
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
<html> | |
<head> | |
<title>My Cool Site : <%= yield :title %></title> | |
</head> | |
<body> | |
<div id="main"> | |
<%= yield %> | |
</div> |
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 remove_fields(link) { | |
$(link).prev("input[type=hidden]").val("1"); | |
$(link).closest('.repeating_fields').slideUp(); | |
} | |
function add_fields(link, association, content) { | |
var newId = new Date().getTime(); | |
var regexp = new RegExp("new_" + association, "g"); | |
var newItem = $(content.replace(regexp, newId)).hide(); | |
$(link).prev('.fields').append(newItem); |
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
# loaded by .zshrc | |
# Load man pages with Bwana | |
# requires http://www.bruji.com/bwana/ | |
if [[ -z $SSH_CONNECTION ]]; then | |
USE_BWANA=`/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep 'bindings:\W*man:'` | |
fi |
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
// Gets called whenever an en event is fired | |
Handle = function(ev){ | |
// Step 1: Event setup | |
var elements = [], | |
target = ev.target, | |
isPropagationStopped = false, | |
isDefaultPrevented = false; | |
// We are on the Capture Phase to start with |
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
// Align text baselines for blocks with different font sizes, so both elements have the same height. | |
// | |
// Suitable for aligning single-line elements while keeping the same height. | |
// | |
// Block elements with different font-sizes and the same line-height have | |
// their middles aligned vertically instead of the same baseline. Use this | |
// to make floated or inline-block elements align on the same baseline. | |
// | |
// This mixin should be used on the smaller font-size element to align its | |
// baseline to the larger text element's line-height. |
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 any additional compass plugins here. | |
load 'compass-layouts' | |
# Set this to the root of your project when deployed: | |
http_path = "" | |
sass_dir = "src" | |
css_dir = "public/stylesheets" | |
images_dir = "public/images" | |
javascripts_dir = "public/javascripts" | |
http_stylesheets_path = "stylesheets" | |
http_images_path = "images" |
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
$global-reset-applied: false; | |
@mixin global-reset { | |
$global-reset-applied: true !global; | |
} |