Skip to content

Instantly share code, notes, and snippets.

View bishopZ's full-sized avatar

Bishop Zareh bishopZ

View GitHub Profile
@bishopZ
bishopZ / jquery.doubletap.js
Created August 1, 2012 05:21 — forked from asgeo1/jquery.doubletap.js
doubletap event for jquery
//based on blog post that I saw here: http://www.sanraul.com/2010/08/01/implementing-doubletap-on-iphones-and-ipads/
(function($){
$.fn.doubletap = function(fn) {
return fn ? this.bind('doubletap', fn) : this.trigger('doubletap');
};
$.attrFn.doubletap = true;
$.event.special.doubletap = {
setup: function(data, namespaces){
@bishopZ
bishopZ / gist:3846285
Created October 6, 2012 21:50 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
/**
* An implementation of the K Combinator.
* http://wiki.tcl.tk/1923
*
* Copied from Mikael Brockman's code in Ruby on Rails' ActiveSupport library.
* http://weblog.jamisbuck.org/2006/10/27/mining-activesupport-object-returning
*/
function returning(value, block, context) {
block.call(context || null, value);
return value;
@bishopZ
bishopZ / indexDB-example.html
Created February 3, 2013 18:06
IndexDB example
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Meme Generator</title>
<style>
#meme-preview {
position: relative;
width: 400px;
height: 400px;
@bishopZ
bishopZ / localstorage-example.html
Created February 3, 2013 18:09
LocalStorage Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Cat Walk</title>
</head>
<body>
<img style="position:absolute;" src="cat.gif">
@bishopZ
bishopZ / StagecoachHack
Last active December 15, 2015 14:49
The Stagecoach Hack
The Stagecoach Hack was inspired by this quotation:
"Plus it was rumored that hackers for big media companies had figured out a way
to get through the defenses that were built into such systems, and run junk
advertisements in your peripheral vision (or even sprang in the fucking middle)
all the time - even when your eyes were closed. Bud knew a guy like that who'd
somehow gotten infected with a meme that ran advertisements for roach motels, in
Hindi, superimposed on the bottom right-hand corner of his visual field,
twenty-four hours a day, until the guy whacked himself."
-- Neal Stephenson, Diamond Age, pg 39
@bishopZ
bishopZ / Version 1.2
Last active December 27, 2015 21:48
Spec Version 1.2
// Specification V1.2
// Collapsed namespace
// Common to all standards
// Saitized:
// Text only content
// URL rewriting
// Some type enforcement
// unescaped
@bishopZ
bishopZ / gist:f44dca19d22b9de96958
Last active August 29, 2015 14:04
Require.js & CommonJS & Node compatible module creation
function(name, root, factory){
if (typeof define !== 'undefined' && define.amd) {
define(name, ['dependency'], factory);
} else if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = factory;
}
exports[name] = factory;
} else {
root[name] = factory;
http://bignerdranch.com/solutions/AndroidProgramming2e.zip
http://emma.sourceforge.net
http://developer.android.com/tools/help/monkey.html
https://android-arsenal.com/news
https://www.reddit.com/r/androiddev
https://plugins.jetbrains.com/?androidstudio