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
module Spec | |
module Matchers | |
module Markup | |
class MatchMarkup | |
def initialize(expected) | |
@expected = expected | |
end | |
def matches?(target) | |
@target = target |
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
it "should wrap with a div" do | |
input = <<-HTML | |
<p> | |
In order to attain the greatest possible clearness, | |
let us return to our example of the railway carriage supposed | |
to be travelling uniformly. | |
</p> | |
HTML | |
output = <<-HTML |
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
$("div#featured_navigation a").click(function () { | |
$(this).effect("highlight", { color: "#a7d6ee" }, 500); | |
var id = '#' + $(this).attr('id').replace('_nav', ''); | |
if (!$(id).is(':visible')) { | |
$(".boxclass:visible").fadeOut(1000, function(){$(id).fadeIn(1000)}) | |
} | |
}); |
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
# includes some technically sovereign countries that are on the official USPS list | |
# as well as territories | |
ABBREVIATIONS = { | |
"Alabama" => "AL", | |
"Alaska" => "AK", | |
"American Samoa" => "AS", | |
"Arizona" => "AZ", | |
"Arkansas" => "AR", | |
"California" => "CA", |
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
define('TWITTER_USERNAME', 'testfacer'); // your twitter username | |
define('TWITTER_PASSWORD', 'testfacer'); // your twitter password | |
// post to twitter for these sections | |
// separate more than one with just a comma: 'articles,about,etc' | |
define('TWITTER_SECTIONS', 'articles'); | |
// setup a callback so we're notified when an article is edited | |
if (@txpinterface == 'admin') { | |
global $txpcfg; |
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
<?php | |
// setup your database connection | |
define('MYSQL_HOST', 'localhost'); | |
define('MYSQL_USERNAME', 'root'); | |
define('MYSQL_PASSWORD', ''); | |
define('MYSQL_DB', 'textpattern'); | |
// connect to the db | |
$link = mysql_connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD) or die('Could not connect: ' . mysql_error()); |
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() { | |
if($.cookie('state') == 'hidden') { | |
$('a.hide').hide(); | |
$('div.toBeHidden').hide(); | |
} else { | |
$('a.show').hide(); | |
} | |
$('a.hide').click(function() { |
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
# see http://www.aeonscope.net/2010/02/22/managing-multiple-heroku-accounts/ | |
# INTRODUCTION | |
# This script echos the active Heroku credentials (useful when switching between multiple Heroku accounts | |
# and remembering which one is active). | |
# USAGE | |
# ruby credentials.rb |
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
export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=1000000000 export RUBY_HEAP_FREE_MIN=500000; "$@" |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Jim Benton"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js" type="text/javascript" charset="utf-8"></script> |
OlderNewer