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 chirp = require('twitter') | |
, _ = require('lodash') // cause underscore is so 2009.. | |
; | |
module.exports = function(app) { | |
// bro shortcuts for getting the tweets | |
app.get('/mah/chirps', function(req, res) { | |
// closures, like a pro javascript dude | |
function hollaback(fail, party) { |
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
// this code isn't intended to work: | |
if (J.body) { | |
a = aa(a); | |
try { | |
var c = J[qa]('<iframe name="' + a + '"></iframe>') | |
} catch (d) { | |
c = J[qa]("iframe"), ha(c, a) | |
} | |
c.height = "0"; |
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 | |
# rotates logs for all services on this box | |
# the services for which we should rotate logs | |
SERVICE_DIR=~/mysrc | |
services=$(ls $SERVICE_DIR) | |
function rotate { | |
logfile=$SERVICE_DIR/$1/logs/$2.log |
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:document.write('<!DOCTYPE html><html><head><meta charset="utf-8"><title>Responsive Design Testing</title><style>body %7B margin: 20px; font-family: sans-serif; overflow-x: scroll; %7D.wrapper %7B width: 6000px; %7D.frame %7B float: left; %7Dh2 %7B margin: 0 0 5px 0; %7Diframe %7B margin: 0 20px 20px 0; border: 1px solid %23666; %7D</style></head><body><div class="wrapper"><div class="frame"><h2>240<span> x 320</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="240" height="320"></iframe></div><div class="frame"><h2>320<span> x 480</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="320" height="480"></iframe></div><div class="frame"><h2>480<span> x 640</span> <small>(small tablet)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="480" height="640"></iframe></div><div class="frame"><h2>768<sp |
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
// how long should we wait for a function to fire? | |
var delay = 0; | |
// a simple way to wrap functions to be delayed | |
function postponed(fn) { | |
return function() { | |
setTimeout(fn, delay); | |
} | |
} |
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
// global used to stop things if it get's out of hand | |
var run = true; | |
function enter_dm() { | |
var li = $(".dm-thread-list.js-dm-thread-list").children("li")[5]; | |
$(li).click(); | |
} |
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
# Description: | |
# Use Skynet to determine if a thing that was said is actually something | |
# S.H.E (Silicon Helix Entity) said. | |
# | |
# Dependencies: | |
# "twss": "0.1.6" | |
# | |
# Commands: | |
# Just say something like, "that was hard". Hubot will do the rest. | |
# |
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
// configure twitter integration | |
var twit = require('twit'); | |
var T = new Twit({ | |
consumer_key: '...' | |
, consumer_secret: '...' | |
, access_token: '...' | |
, access_token_secret: '...' | |
}); | |
// express app |
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> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<video id="sourcevid" autoplay="true">NO SUPPORT FOR VIDEO </video> | |
</body> | |
</html> |
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
import SimpleHTTPServer; | |
map = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map; | |
map[""] = "text/plain" | |
for key, value in map.items(): | |
map[key] = value + ";charset=UTF-8" | |
SimpleHTTPServer.test() |