- :help keyword - open help for keyword
- :o file - open file
- :saveas file - save file as
- :close - close current pane
This file contains hidden or 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
-- `menu_click`, by Jacob Rus, September 2006. | |
-- Ref: https://stackoverflow.com/questions/14669542/automatically-open-the-safari-debugger-when-the-iphone-simulator-is-launched | |
on menu_click(mList) | |
local appName, topMenu, r | |
-- Validate our input | |
if mList's length < 3 then error "Menu list is not long enough" | |
-- Set these variables for clarity and brevity later on |
This file contains hidden or 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
/** | |
* Copyright (c) 2016-2018 Richard Connamacher. Permission is granted to use this code under | |
* the terms of the Simplified BSD License, https://opensource.org/licenses/BSD-2-Clause | |
* | |
* This monkey-patches the native ECMAScript 6 Promise class to add support for | |
* the Promise Rejection Events unhandledrejection and rejectionhandled, as defined | |
* in ECMAScript 7 and the HTML Living Standard. | |
* | |
* THIS FILE MUST NOT BE TRANSPILED into ECMAScript 5. Builtins like Promise can only | |
* be subclassed using native ES6 classes, not backwards-compatible ES5 constructor |
This file contains hidden or 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
//Bookmarklet: | |
//javascript:!function(){var o=location.host.slice(-9);"github.io"==o?location.href.replace(/\/\/([^\.]+)\.github\.io\/([^\/]+)/,function(o,t,i){location.href="https://github.com/"+t+"/"+i}):"ithub.com"==o&&location.href.replace(/github\.com\/([^\/]+)\/([^\/]+)/,function(o,t,i){location.href="https://"+t.toLowerCase()+".github.io/"+i})}(); | |
(function(){ | |
var host = location.host.slice(-9); | |
if(host == 'github.io'){ | |
location.href.replace(/\/\/([^\.]+)\.github\.io\/([^\/]+)/, function(a, name, project){ | |
location.href = 'https://github.com/' + name + '/' + project; | |
}) | |
} else if (host == 'ithub.com') { |
This file contains hidden or 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 $ = function(s){ | |
if(!(this instanceof $)){ | |
return new $(s); | |
} | |
this.push.apply(this, document.querySelectorAll(s)); | |
} | |
$.fn = $.prototype = []; | |
$.fn.each = function(fn){ |
This file contains hidden or 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
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
This file contains hidden or 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 arr = { | |
max: function(array) { | |
return Math.max.apply(null, array); | |
}, | |
min: function(array) { | |
return Math.min.apply(null, array); | |
}, | |
range: function(array) { |
This file contains hidden or 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
server { | |
listen *:80; | |
server_name www.example.com; | |
rewrite ^(.*) http://example.com $1 permanent; | |
} | |
server { | |
listen *:80; | |
server_name example.com; |
var Person = Backbone.Model.extend();
NewerOlder