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
| package; | |
| import flash.display.Sprite; | |
| import flash.geom.Point; | |
| import openfl.events.JoystickEvent; | |
| #if android | |
| import openfl.utils.JNI; | |
| import tv.ouya.console.api.OuyaController; |
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 tabbableElements = 'a[href], area[href], input:not([disabled]),' + | |
| 'select:not([disabled]), textarea:not([disabled]),' + | |
| 'button:not([disabled]), iframe, object, embed, *[tabindex],' + | |
| '*[contenteditable]'; | |
| var keepFocus = function (context) { | |
| var allTabbableElements = context.querySelectorAll(tabbableElements); | |
| var firstTabbableElement = allTabbableElements[0]; | |
| var lastTabbableElement = allTabbableElements[allTabbableElements.length - 1]; |
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
| javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
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
| // +build !appengine | |
| package main | |
| /* | |
| * Usage: ./TinyGCMServer <API_KEY> <Server URL(:port)> | |
| * Test: curl -d "<NOTIFICATION MESSAGE>" http://serverURL/sendMessage?target=<REGISTRATION_ID> | |
| */ | |
| import ( | |
| "fmt" | |
| gcm "github.com/googollee/go-gcm" |
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
| $ = jQuery | |
| queues = {} | |
| running = false | |
| queue = (name) -> | |
| name = 'default' if name is true | |
| queues[name] or= [] | |
| next = (name) -> |
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
| $ = jQuery | |
| $.support.touch or= ('ontouchstart' of window) | |
| # Helper functions | |
| parentIfText = (node) -> | |
| if 'tagName' of node then node else node.parentNode | |
| swipeDirection = (x1, x2, y1, y2) -> | |
| xDelta = Math.abs(x1 - x2) |
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
| // Example: | |
| JavaScript.load("/javascripts/something.js"); | |
| // With callback (that’s the good thing): | |
| JavaScript.load("http://www.someawesomedomain.com/api.js", function() { | |
| API.use(); // or whatever api.js provides ... | |
| }); |
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
| <?php | |
| $diff_file = file('diff.txt'); | |
| $count = 1; | |
| $diff_data = array(); | |
| foreach ($diff_file as $row) { | |
| if (strpos($row, 'diff --git') !== false) { | |
| $count = 1; | |
| } |
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) 2013 Amos Laber | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
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
| package { | |
| import com.bit101.components.PushButton; | |
| import com.bit101.components.TextArea; | |
| import com.codeazur.as3swf.SWF; | |
| import com.codeazur.as3swf.tags.*;//TagPlaceObject; | |
| import flash.display.DisplayObject; | |
| import flash.display.DisplayObjectContainer; | |
| import flash.display.Loader; | |
| import flash.display.Sprite; | |
| import flash.events.Event; |