Skip to content

Instantly share code, notes, and snippets.

👮
this is the police

Mike Taylor miketaylr

👮
this is the police
Block or report user

Report or block miketaylr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@miketaylr
miketaylr / pkcs11.txt
Last active Aug 29, 2015
Grepping inlined JS from top 64,621 of Alexa 1M list (as of last month).
View pkcs11.txt
webdevdata.org-2013-12-09-064743//01/evgenyfireform.com.html.txt:(function(a){window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};a.fn.snippet=function(e,c){if(typeof e=="object"){c=e}if(typeof e=="string"){e=e.toLowerCase()}var d={style:"random",showNum:true,transparent:false,collapse:false,menu:true,showMsg:"Expand Code",hideMsg:"Collapse Code",clipboard:"",startCollapsed:true,startText:false,box:"",boxColor:"",boxFill:""};var b=["acid","berries-dark","berries-light","bipolar","blacknblue","bright","contrast","darkblue","darkness","desert","dull","easter","emacs","golden","greenlcd","ide-anjuta","ide-codewarrior","ide-devcpp","ide-eclipse","ide-kdev","ide-msvcpp","kwrite","matlab","navy","nedit","neon","night","pablo","peachpuff","print","rand01","the","typical","vampire","vim","vim-dark","whatis","whitengrey","zellner"];if(c){a.extend(d,c)}return this.each(function(){var H=d.style.toLowerCase();if(d.style=="rand
@miketaylr
miketaylr / barf-function
Created Jan 30, 2014
lol @ error-handling
View barf-function
# Beautify contents of clipboard and create .js file
# on Desktop with name of argument
# (requires global uglifyjs installation)
barf () {
echo "Barfing $1.js to Desktop"
pbpaste | uglifyjs -b - > ~/Desktop/$1.js
}
View mqm.Util.js
(function() {
Util = {
isDialogShowing: false,
isInterstitialShowing: false,
navigate: function(b, a) {
a = a || {};
if (a.newTab) {
window.open(b);
} else {
document.location.href = b;
View mapquest.js
(function() {
var b = navigator.geolocation, i = [], m = {
enableHighAccuracy: true,
maximumAge: 5e3,
timeout: 1e3 * 60 * 2
}, g = null, c = null, n = 0, h = null, a = mqm.Util.isIOS5(), d = function() {
if (b && !c) {
if (a) {
j();
} else {
@miketaylr
miketaylr / app-min.js
Created Jan 31, 2014
app.nytimes.com
View app-min.js
var requirejs, require, define;
!function(e) {
function t(e, t) {
return v.call(e, t);
}
function n(e, t) {
var n, r, i, o, s, a, u, l, c, d, p = t && t.split("/"), h = m.map, f = h && h["*"] || {};
if (e && "." === e.charAt(0)) if (t) {
for (p = p.slice(0, p.length - 1), e = p.concat(e.split("/")), l = 0; l < e.length; l += 1) if (d = e[l],
View dvacetiri.js
function getParameterByName(b) {
b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var a = "[\\?&]" + b + "=([^&#]*)";
var d = new RegExp(a);
var c = d.exec(window.location.href);
if (c == null) {
return "";
} else {
return decodeURIComponent(c[1].replace(/\+/g, " "));
}
View gist:8924778
if (!HTMLVideoElement.prototype.canPlayType) {
HTMLVideoElement.prototype.canPlayType = function(type) {
return [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
View gist:8939631
(function() {
function b(a, c, d) {
if ("_root" == c) return d;
if (a !== d) {
var e;
m || (a.matches && (m = a.matches), a.webkitMatchesSelector && (m = a.webkitMatchesSelector),
a.mozMatchesSelector && (m = a.mozMatchesSelector), a.msMatchesSelector && (m = a.msMatchesSelector),
a.oMatchesSelector && (m = a.oMatchesSelector), m || (m = k.matchesSelector));
e = m;
if (e.call(a, c)) return a;
@miketaylr
miketaylr / checker.py
Last active Aug 29, 2015
Bugzilla Tech Evangelism URL status checker
View checker.py
#!/usr/bin/env python
import json
import requests
# This search corresponds to: Tech Evangelism bugs that are UNCONFIRMED, NEW,
# or REOPENED. When we loop through the response, we skip bugs with an empty
# url field.
SEARCH_URL = ("https://api-dev.bugzilla.mozilla.org/latest/bug?"
"bug_status=UNCONFIRMED"
View gist:9095795
define("core-app/views/login-screen.view", [ "require", "exports", "module", "views/layout.view", "text!core-app/tmpl/login-screen.html", "views/alert.view", "views/modal.view", "utils/device" ], function(e, n, r) {
var i, o, s, a, u, l, c;
return s = e("views/layout.view"), u = e("text!core-app/tmpl/login-screen.html"),
i = e("views/alert.view"), l = e("views/modal.view"), o = e("utils/device"), r.exports = a = function(e) {
function n() {
return c = n.__super__.constructor.apply(this, arguments);
}
return t(n, e), n.prototype.tmpl = u, n.prototype.className = "login-screen", n.prototype.iosErrorMessage = "Sorry, your browser is not supported — to log in or install this app, we recommend\nyou use your native Safari browser. For more details on\nsupported devices and browsers, please visit our FAQ (<a\nhref='http://www.nytimes.com/content/help/mobile/todays-paper/todays-paper.html'>www.nytimes.com/content/help/mobile/todays-paper/to
You can’t perform that action at this time.