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: [].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}) |
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:void(document.location='view-source:'+document.location) |
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:void(function(){var f=function(e){console.log('%o:%o',this,e)},ael='addEventListener',n='click';window[ael](n,f);document[ael](n,f);window._zdf=f;}(window)) |
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 blob = new Blob([ | |
"onmessage = function(e) { postMessage('msg from worker'); }"]); | |
// Obtain a blob URL reference to our worker 'file'. | |
var blobURL = window.URL.createObjectURL(blob); | |
var worker = new Worker(blobURL); | |
worker.onmessage = function(e) { | |
console.dir(e); | |
}; |
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() { | |
module = module || {}; | |
// Used to resolve the internal `[[Class]]` of values | |
var toString = Object.prototype.toString; | |
// Used to resolve the decompiled source of functions | |
var fnToString = Function.prototype.toString; | |
// Used to detect host constructors (Safari > 4; really typed array specific) | |
var reHostCtor = /^\[object .+?Constructor\]$/; |
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
netsniff () { | |
sudo tcpdump -i wlan0 -n ip | \ | |
awk '{ print gensub(/(.*)\..*/,"\\1","g",$3), $4, gensub(/(.*)\..*/,"\\1","g",$5) }' | \ | |
awk -F " > " '{print $1"\n"$2}' | |
} |
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
# Adapted by Ryan Florence (http://ryanflorence.com) | |
# original by Chris Dinger: http://www.houseofding.com/2009/03/create-an-rss-feed-of-your-git-commits/ | |
# | |
# Takes one, two, or three arguments | |
# 1. Repository path (required) - the path to the repository | |
# 2. The url to put as the <link> for both channel and items | |
# 3. the repository name, defaults to directory name of the repository | |
# | |
# Command line usage: | |
# ruby gitrss.rb /path/to/repo > feed.rss |
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>Building a router</title> | |
<script> | |
// Put John's template engine code here... | |
(function () { | |
// A hash to store our routes: |
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/sh | |
## | |
# This is a script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# Run in interactive mode with: | |
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)" | |
# | |
# or run it without prompt questions: |
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
require 'rubygems' | |
require 'mechanize' | |
FIRST_NAME = 'FIRST_NAME' | |
LAST_NAME = 'LAST_NAME' | |
PHONE = 'PHONE' | |
EMAIL = '[email protected]' | |
PARTY_SIZE = 2 | |
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |