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
var F = function () {}; | |
F.name // '' | |
F.name = "foo"; | |
F.name // '' |
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
######################## | |
# wp2toto # | |
# by Joseph Weissman # | |
######################## | |
# config | |
author = "user" | |
wpfile = "user_blog_export.xml" | |
outdir = "../articles/" |
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
// less | |
foo, bar { | |
color: black; | |
lol, &:cat { | |
font: none; | |
> a, b { | |
color: red; | |
} |
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
// | |
// JS Prompt - a Talker plugin <http://talkerapp.com> | |
// | |
// to activate/deactivate the js prompt: /prompt | |
// to share variables amongst users: this.foo = 1; | |
// | |
plugin.usage = '/prompt'; | |
plugin.command = 'prompt'; | |
plugin.evalMode = false; | |
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
var events = require('events'); | |
exports.Promise = function () { | |
exports.EventEmitter.call(this); | |
this._blocking = false; | |
this.hasFired = false; | |
this._values = undefined; | |
}; | |
process.inherits(exports.Promise, events.EventEmitter); |
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
i = 0 | |
File.read("wp_posts2.csv").split('$$')[1..-1].each do |entry| | |
next if entry.gsub(/\n/,'').empty? | |
print '.' | |
date, body, title, slug = entry.split('||').map {|e| e.sub(/^""/, '').sub(/""$/, '') } | |
puts title if title.include? ':' | |
slug = title.downcase.gsub('[^a-z0-9]+', '-') if slug.empty? | |
date = date.split(/ +/).first | |
File.open("articles/#{date}-#{slug}.txt", "w") do |file| | |
file.write("title: #{title}\ndate: #{date.gsub('-', '/')}\nslug: #{slug}\n\n#{body}\n") |
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
This file lays out my planned open-source projects for the next year or so. | |
These projects are interdependent upon eachother in complex ways, hence the | |
complexity of this graph. The *overall*, eventual goal, is a set of my own | |
clients I can use with Google Wave, a web framework I *actually like*, and a | |
JavaScript development environment/ecosystem I can stomache. | |
This list is ordered bottom-up, and right-to-left. Items below and indented | |
another item *must* be completed (or have portions thereof completed) before | |
their parent item can be worked on. |
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
var posix = require("posix"); | |
var sys = require("sys"); | |
var continuables = require('continuables'); | |
function writeFile(filename, value, mode) { | |
if (typeof value !== "string") { | |
throw new Error('Value must be a string'); | |
} | |
if (typeof mode === "undefined") { | |
mode = 0600; |
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
// | |
// A Talker plugin to do live substitutions of previous message | |
// | |
// string example: s/wordl/world | |
// regexp example: r/^w/W | |
// | |
plugin.onMessageReceived = function (event) { | |
var match, row, messages, search; | |
if (match = event.content.match(/^([sr])\/(.+?)\/([^\/]*)(?:\/([gi])?)?$/)) { | |
row = $("#log tr[author='" + event.user.name + "'].message:last"); |
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.paths.unshift( | |
__filename.split('/').slice(0, -1).concat('vendor').join('/')); |