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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>eHarbor</title> | |
<%= stylesheet_link_tag 'boilerplate', 'main' %> | |
<%= javascript_include_tag :defaults %> | |
<!--[if IE]> | |
<%= javascript_include_tag 'http://html5shiv.googlecode.com/svn/trunk/html5.js' %> | |
<![endif]--> | |
</head> |
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
$('input, textarea').live('keyup click change', function() { | |
if(this.defaultValue != this.value) { | |
$(this.form).trigger('changed'); | |
} | |
}); | |
$('form').live('changed', function() { | |
$(this).data('dirty', true); | |
}).live('submit', function() { | |
var wasDirty = $(this).data('dirty'); | |
$(this).data('dirty', false); |
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 List | |
include MongoMapper::Document | |
key :name, String, :required => true | |
many :users, :foreign_key => 'list_ids' | |
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
jQuery.fn.wordWrap = function () { | |
// This splits any text node by spaces, and any 'word' that is longer than 26 characters it | |
// splits apart each character by a <wbr> tag so it breaks if it needs to. | |
return this.each(function () { | |
var walker = document.createTreeWalker(this, NodeFilter.SHOW_TEXT, null, false); | |
while (walker.nextNode()) { | |
var node = walker.currentNode; | |
var parts = node.nodeValue.split(' '); | |
for (i = 0; i < parts.length; i++) { | |
if (parts[i].length > 26) parts[i] = parts[i].split('').join(String.fromCharCode('8203')) |
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
From: Mail Delivery Subsystem <MAILER-DAEMON@isadora.cybox.com> | |
Subject: Returned mail: see transcript for details | |
Date: September 5, 2009 11:11:42 AM EDT | |
To: Daniel Morrison <daniel@collectiveidea.com> | |
The original message was received at Sat, 5 Sep 2009 09:11:42 -0600 | |
from mail-yx0-f195.google.com [209.85.210.195] | |
----- The following addresses had permanent fatal errors ----- | |
<terrys@breakthroughsys.com> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Rails App</title> | |
<%- if protect_against_forgery? -%> | |
<meta name="authenticity-token" id="authenticity-token" content="<%= form_authenticity_token %>" /> | |
<%- end -%> | |
<%= javascript_include_tag 'jquery', 'rails' %> | |
</head> | |
<body> |
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
// Requires prototype.js | |
// assumes you have some container with class .favicon with a bunch of links inside | |
// As seen on http://ideafoundry.info/embassy | |
// Documentation at http://daniel.collectiveidea.com/blog/2009/5/1/fun-with-favicons | |
function loadFavicons() { | |
$$('.favicon a').each(function(link){ | |
link.setStyle({ | |
background: 'url('+link.href+'favicon.ico) no-repeat 0 0', | |
paddingLeft: '24px' |