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
var connect = require('connect'); | |
connect.createServer( | |
connect.static(__dirname) | |
).listen(8080); |
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
<script> | |
(function() { | |
var api = "y.com?callback="; | |
$.getJSON(api, jsonData) | |
.done(function(data) { | |
Do whatever you want | |
}); | |
})(); | |
</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
<iframe src="http://y.com" id="iframe"></iframe> | |
<script> | |
var sendToWindow = document.getElementById("iframe").contentWindow | |
function() { | |
window.postMessage(somedata, "http://y.com") | |
} | |
</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
Agnes en_US # Isn't it nice to have a computer that will talk to you? | |
Albert en_US # I have a frog in my throat. No, I mean a real frog! | |
Alex en_US # Most people recognize me by my voice. | |
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train. | |
Bahh en_US # Do not pull the wool over my eyes. | |
Bells en_US # Time flies when you are having fun. | |
Boing en_US # Spring has sprung, fall has fell, winter's here and it's colder than usual. | |
Bruce en_US # I sure like being inside this fancy computer | |
Bubbles en_US # Pull the plug! I'm drowning! | |
Cellos en_US # Doo da doo da dum dee dee doodly doo dum dum dum doo da doo da doo da doo da doo da doo da doo |
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
/* | |
* Based on https://gist.github.com/583836 from http://stackoverflow.com/questions/3709391/node-js-base64-encode-a-downloaded-image-for-use-in-data-uri. | |
* Neither that gist nor this one work for me in 0.2.x or 0.3.x. | |
*/ | |
var request = require('request'), | |
BufferList = require('bufferlist').BufferList, | |
sys = require('sys'), | |
bl = new BufferList(), | |
url = 'http://nodejs.org/logo.png' | |
; |
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
{ | |
"10 Guy":"http://i.imgur.com/LaENqOV.jpg", | |
"3rd World Success Kid":"http://i.imgur.com/WA5duA1.jpg", | |
"90's Problems":"http://i.imgur.com/tL47qtp.jpg", | |
"Aaand It's Gone":"http://i.imgur.com/yf12saq.jpg", | |
"Actual Advice Mallard":"http://i.imgur.com/WymFmVy.jpg", | |
"Advice Dog":"http://i.imgur.com/Qk0VO6D.jpg", | |
"Advice God":"http://i.imgur.com/xH2fSFg.jpg", | |
"Almost Politically Correct Redneck":"http://i.imgur.com/YqLgINf.jpg", | |
"Am I The Only One":"http://i.imgur.com/gS9YL5U.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
function settitle { | |
title_lab=${PWD##*/} | |
echo -ne "\e]2;$title_lab\a" | |
} | |
function cd() { | |
builtin cd "$@" && settitle; | |
} |
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
'use strict'; | |
var uri = require('../util/url'); | |
var pool = require('generic-pool'); | |
var driver = require('redis'); | |
var flag = require('node-env-flag'); | |
module.exports = function(url) { | |
var connection_settings = uri(url || process.env.REDIS_URL); | |
return pool.Pool({ |
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
'use strict'; | |
var uri = require('../util/url'); | |
var pool = require('generic-pool'); | |
var driver = require('mongodb'); | |
var flag = require('node-env-flag'); | |
module.exports = function(url) { | |
var connection_settings = uri(url || process.env.MONGODB_URL); | |
return pool.Pool({ |
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
// WHAT? | |
// | |
// Script to embed Gendly anywhere | |
// | |
// USAGE: | |
// | |
// <script src="//js.gendly.com" async="true" defer="true"></script> | |
// | |
(function(window, document) { |