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
function makeCounter() { | |
// `i` is only accessible inside the closure created when the | |
// `makeCounter` function is invoked. | |
var i = 0; | |
return function() { | |
console.log( ++i ); | |
}; | |
} |
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
diff --git a/Gemfile b/Gemfile | |
index ec7a4ff..e86cc9d 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -10,6 +10,8 @@ gem 'mime-types', :require => 'mime/types' | |
gem 'rdiscount' | |
gem 'RedCloth' | |
+gem 'backports', :platforms => 'ruby_18' | |
+ |
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
Validate('#new_user', { | |
'username' : { | |
'minimum' : 5, | |
'maximum' : 20, | |
'presence' : true | |
}, | |
'password' : { | |
'minimum' : 8, | |
'maximum' : 32, | |
'presence' : true |
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> | |
<meta charset="utf-8"> | |
<title>Twitter</title> | |
<link rel="stylesheet" href="style.css"> | |
<script type="text/javascript" src="jquery-1.6.1.min.js"></script> | |
<script type="text/javascript" src="jquery.tweet.js"></script> | |
<script type="text/javascript" src="jquery.li-scroller.js"></script> | |
<script> |
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 | |
var $contactTimeOptions = array( | |
'morning' => 'morning', | |
'afternoon' => 'afternoon', | |
'evening' => 'evening' | |
); | |
?> |
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 | |
$files = array(); | |
$path = 'i/s/'; | |
if ( $dir = opendir( $path ) ) { | |
while ( false !== ( $file = readdir( $dir ) ) ){ | |
switch( mime_content_type( $path.$file ) ) { | |
case 'image/jpeg': | |
case 'image/jpg': |
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
javascript:(function(){var d=document,j=d.getElementById('__paulify_nodes'),k=null;var files=['https://github.com/rtgibbons/Paulify/raw/master/js/paulify.js','https://github.com/rtgibbons/Paulify/raw/master/js/paulify_run.js'];if(j){paulify_add();}else{k=d.createElement('div');k.id='__paulify_nodes';d.getElementsByTagName('body')[0].appendChild(k);for(var l=0;l<files.length;l++){j=d.createElement('script');j.src=files[l];k.appendChild(j);}}})(); |
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
require 'formula' | |
class Macvim < Formula | |
homepage 'http://code.google.com/p/macvim/' | |
version '7.3-61' | |
head 'https://github.com/alloy/macvim.git', :branch => 'split-browser' | |
def options | |
[ | |
# Building custom icons fails for many users, so off by default. |
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
#!/bin/bash | |
# | |
# /etc/rc.d/init.d/mms-agent | |
# | |
# 10Gen Mongod montiroing service | |
# must edit the settings.py first and edit this file with the location of agent.py | |
# | |
# description: 10Gen monitoring service - need ot fix pid so we can shut it down | |
# chkconfig: - 90 10 |
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
#!/bin/sh | |
# | |
# This shell script passes all its arguments to the binary inside the | |
# MacVim.app application bundle. If you make links to this script as view, | |
# gvim, etc., then it will peek at the name used to call it and set options | |
# appropriately. | |
# | |
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This | |
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico | |
# Weber and Bjorn Winckler, Aug 13 2007). |