Skip to content

Instantly share code, notes, and snippets.

View elliotttf's full-sized avatar

Elliott Foster elliotttf

View GitHub Profile
@elliotttf
elliotttf / bookmarklet.js
Last active December 13, 2015 18:19
Pro-domme bookmarklet for the lulz.
/**
* Made with ♥ by Elliott Foster
* @elliotttf
*/
var go = (function(window, document) {
function replacer(match, p1, p2, p3, offset, string) {
var ret = p1 + p2.charAt(0).toUpperCase() + p2.slice(1) + p3;
return ret;
}
--- desktop.html 2013-02-07 13:49:37.000000000 -0600
+++ mobile.html 2013-02-07 13:48:44.000000000 -0600
@@ -1,12 +1,12 @@
<picture data-alt="Can't wait for this breakfast.">
<!-- <source src="http://fullplateliving.org/sites/default/files/styles/super__mobile/public/recipes/banner_images/20121023-dsc_3523.jpg" width="480" height="162"> -->
<source src="http://fullplateliving.org/sites/default/files/styles/super__mobile/public/recipes/banner_images/20121023-dsc_3523.jpg" width="480" height="162">
<!-- <source src="http://fullplateliving.org/sites/default/files/styles/super__mobile/public/recipes/banner_images/20121023-dsc_3523.jpg" media="(min-width: 320px)"> -->
<source src="http://fullplateliving.org/sites/default/files/styles/super__mobile/public/recipes/banner_images/20121023-dsc_3523.jpg" media="(min-width: 320px)">
<!-- <source src="http://fullplateliving.org/sites/default/files/styles/super__full/public/recipes/banner_images/20121023-dsc_3523.jpg" media="(min-width: 768px)"> -->
<so
app.router.post('/', function() {
var loopString = '';
this.req.chunks.forEach(function(chunk) {
loopString += chunk;
});
if (this.req.chunks.toString() !== loopString) {
this.res.end('WAT?');
return;
}
this.res.end('yay');
diff --git a/app.js b/app.js
index 6009506..6f050ff 100644
--- a/app.js
+++ b/app.js
@@ -4,32 +4,25 @@
*/
var express = require('express')
- , routes = require('./routes')
- , user = require('./routes/user')
var out = 'Hello' + false ? 'WAT.' : 'world.';
(function($) {
if (!$('#selector').hasClass('active')) {
// Do thangs.
}
}(jQuery));
{
"name": "hosted-hubot",
"version": "2.1.4",
"author": "GitHub Inc.",
"keywords": "github hubot campfire bot",
"description": "A simple helpful Robot for your Company",
"licenses": [{
"type": "MIT",
"url": "http://github.com/github/hubot/raw/master/LICENSE"
}],
Order allow,deny
Allow from all
var supportsOrientationChange = "onorientationchange" in window;
var orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
window.addEventListener(
orientationEvent, function() {
window.location.reload()
},
false
);
<thing>
<date year="2011" month="8" date="4" day="4"/>
<time hour="22" minute="15" second="7" timezone="Eastern" utc-hour="-4" utc-minute="00"/>
<!-- ... -->
</thing>