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 Benchmark Declaring len inside and outside of a for loop | |
// Populate array with 0..100 | |
var arr = [] | |
for (var i=0; i<1e3; ++i) { arr[i] = i; } | |
// Declare len outside of the for | |
function outfor(a) { | |
var len = a.length; | |
for (var i=0; i<len; ++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
#!/usr/bin/ruby | |
puts | |
File.open(ARGV[0]).each do |line| | |
line = line.split | |
if line[0] == "IBOutlet" | |
puts "[#{line[2].tr('*;','')} release];" | |
elsif line[1] and line[1].include? "*" | |
puts "[#{line[1].tr('*;','')} release];" | |
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
diff --git a/bin/pomo b/bin/pomo | |
index 193b7f4..84eb20a 100755 | |
--- a/bin/pomo | |
+++ b/bin/pomo | |
@@ -228,7 +228,7 @@ command :list do |c| | |
list.tasks.each_with_index do |task, i| | |
next if options.complete && !task.complete? | |
next if options.incomplete && task.complete? | |
- say ' %s %2d. %-45s : %d minutes' % [task.complete? ? '√' : ' ', i, task.to_s, task.length] | |
+ say ' %s %2d. %-45s : %d minutes' % [task.complete? ? '✓' : ' ', i, task.to_s, task.length] |
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 20e7d8628c14c10d079ac0299453635079c13545 Mon Sep 17 00:00:00 2001 | |
From: Joseph Pecoraro <joepeck02@gmail.com> | |
Date: Sat, 16 Jan 2010 20:10:46 -0500 | |
Subject: [PATCH] Updated out of date LICENSE file. | |
--- | |
LICENSE | 6 +----- | |
1 files changed, 1 insertions(+), 5 deletions(-) | |
diff --git a/LICENSE b/LICENSE |
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
// ==UserScript== | |
// @name Diff for gist.github | |
// @description adds a diff function to http://gist.github.com/ | |
// @namespace http://userscripts.org/users/40991 | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
// Working for Safari/Webkit with GreaseKit | |
// A few minor tweaks. I also inlined the requires, |
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 867965c77c0cb5ece7f953f1ff9d906f234eeabb Mon Sep 17 00:00:00 2001 | |
From: Joseph Pecoraro <joepeck02@gmail.com> | |
Date: Mon, 18 Jan 2010 12:04:49 -0500 | |
Subject: [PATCH] Fixed typo in comments. | |
--- | |
src/node.js | 4 ++-- | |
1 files changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/src/node.js b/src/node.js |
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 f1c3f11113d3e4f75b6addb56e67b3b7ec8076f3 Mon Sep 17 00:00:00 2001 | |
From: Joseph Pecoraro <joepeck02@gmail.com> | |
Date: Tue, 23 Feb 2010 00:41:00 -0800 | |
Subject: [PATCH] Added fs.glob and fs.globSync. | |
--- | |
doc/api.txt | 10 ++++++ | |
src/node.js | 61 +++++++++++++++++++++++++++++++++----- | |
test/mjsunit/test-fs-glob.js | 46 ++++++++++++++++++++++++++++ | |
test/mjsunit/test-readdir.js | 1 + |
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
// So this will run in a browser as well as a shell. | |
if (this.window) { | |
window.print = function(s) { console.log(s); } | |
} | |
var TOTAL = 1e5; | |
var row = 0; | |
var data = { | |
rows: [{ a: "hi", b: 1, c: true, d: "wah!" }] | |
}; |
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
// So this will run in a browser as well as a shell. | |
if (this.window) window.print = function(s) { console.log(s); } | |
var TOTAL = 1e6; | |
var str = "color: red"; | |
// Test with regex | |
(function() { | |
var start = Date.now(); | |
for (var i=0; i<TOTAL; ++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
Array.convert = function convert(list) { | |
return Array.prototype.slice.call(list); | |
} | |
function buildCSSProperties() { | |
var properties = Array.convert(document.defaultView.getComputedStyle(document.documentElement, "")); | |
var length = properties.length; | |
for (var i = 0; i < length; ++i) { | |
var propertyWords = properties[i].split("-"); | |
var j = propertyWords.length; |