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
// see if this is a mobile browser | |
var w = window, d = document; | |
var regex = /mobi|android|webos|blackberry|ipad|ipod|iphone|tablet|phone|kindle/i; | |
r.mobile = regex.test(ua) || regex.test(w.navigator.platform); | |
if (r.mobile) { | |
if (w.chrome || w.performance) { // this is an android device posing as an iPhone | |
if (w.Worker) { // android 4.4+ |
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 FPSUtils { | |
import flash.display.DisplayObject; | |
import flash.display.MovieClip; | |
import flash.display.Stage; | |
import flash.events.Event; | |
import flash.events.EventDispatcher; | |
import flash.events.IEventDispatcher; | |
import flash.external.ExternalInterface; | |
import flash.utils.clearInterval; | |
import flash.utils.getTimer; |
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
'use strict'; | |
// ****** BEGIN SOLUTION TIMER ******* // | |
module.exports = (function () { | |
// all times will be measured in seconds by default | |
return function (_arrayOfTimes, _scriptTimeLimit, _timerCallback, _timeLimitCallback, _useMilliseconds) { // _useSeconds - add this later to add the ability to measure in milliseconds | |
var _startTime = 0, // the time this script started | |
_initialPlayTime = 0, // the time the playhead initially started |
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 | |
express = require( 'express' ), | |
connect = require('connect'), | |
app = express(); | |
count = 0; | |
app.configure( function() { | |
app.use(connect.urlencoded()); | |
app.use(connect.json()); | |
}); |
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 $$$i = 0, | |
$$mt = []; | |
while(navigator.mimeTypes[$$$i]){ | |
$$mt.push(navigator.mimeTypes[$$$i]); | |
$$$i++; | |
} | |
console.table($$mt.map(function(i,v,a){ | |
return { | |
'name':i.description||i.enabledPlugin.description, |
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 runningProcessCount = 0, | |
processQueuePosition = 1, | |
processLimit = 2, | |
totalProcesses = 10; | |
function throttleProcesses(){ | |
if(processLimit > runningProcessCount){ | |
fakeProcess(); | |
return true; | |
} else { |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="robbyrussell" | |
#ZSH_THEME="cloud" | |
#ZSH_THEME="wedisagree" # throws an error |
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
# oh-my-zsh Zen Theme | |
### Git | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}%{$reset_color%}%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_no_bold[white]%}☁%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[magenta]%}▴%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[magenta]%}▾%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_no_bold[green]%}✚%{$reset_color%}" |
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
(function(){ | |
var amounts = document.querySelectorAll('#Posted tbody .amount'); | |
var balance = Number(document.querySelector('#AccountDetailTable .card-accountdetailcol tbody tr td:nth-child(2)').innerText.substr(1).replace(',','')); | |
var iii=0; | |
var amount = ''; | |
var element = null; | |
var elementsArray = []; | |
for(iii=0; iii < amounts.length; iii++) { | |
element = amounts[iii]; |
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 stream = require('stream'), | |
util = require('util'); | |
function FilterThirdPartyWarnings(options){ | |
// allow use without new | |
if (!(this instanceof FilterThirdPartyWarnings)) { | |
return new FilterThirdPartyWarnings(options); | |
} | |
stream.Transform.call(this, options); |