Skip to content

Instantly share code, notes, and snippets.

en:
good: good
good_intro: you're using
good_outro: ", a good web browser."
good_browser: good browser
good_badge_intro: show the world you care about web standards and put the browser challenge badge on your site.
bad: bad
bad_intro: treat yourself to something good.
bad_outro: upgrade to <a href='http://www.apple.com/safari/download/'>safari</a> or <a href='http://firefox.com/'>firefox</a> today!
bad_browser: bad browser
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
defineImportCallback = (script, callback) ->
unless script.readyState?
script.onload = -> callback()
return
# IE case
script.onreadystatechange = ->
if script.readyState is "loaded" or script.readyState is "complete"
script.onreadystatechange = null
callback()
function element(value, context) {
var ret = $([]); // $(context) ?
if (value.jquery) {
ret = value;
} else if (value == 'parent') {
ret = $(context).parent();
} else if (value == 'clone') {
ret = $(context).clone().removeAttr('id');
} else if (value == 'window') {
var fs = require('fs');
/**
* Offers functionality similar to mkdir -p
*
* Asynchronous operation. No arguments other than a possible exception
* are given to the completion callback.
*/
function mkdir_p(path, mode, callback, position) {
mode = mode || 0777;
require.extensions[".json"] = function (module, filename) {
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8"))
}
@quickredfox
quickredfox / chest.md
Created May 4, 2012 19:24
The Github Pirates' Chest
@quickredfox
quickredfox / twitter-oauth.js
Created July 26, 2012 03:28 — forked from santosh79/twitter-oauth.js
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']);
@quickredfox
quickredfox / app.js
Created December 4, 2012 22:55 — forked from marlun/app.js
Using stylus with Express.js
/**
* Module dependencies.
*/
var express = require('express')
, stylus = require('stylus');
var app = express.createServer();
// This must be BEFORE other app.use
@quickredfox
quickredfox / express-stylus.html
Created December 4, 2012 22:56 — forked from bentruyman/express-stylus.html
Using Stylus Middleware with Express
<!doctype html>
<html lang="en">
<head>
<title>My Web Page</title>
<meta charset="utf-8">
<link href="/stylesheets/main.css" rel="stylesheet">
</head>
<body>
</body>
</html>