Skip to content

Instantly share code, notes, and snippets.

View elijahmanor's full-sized avatar
😀

Elijah Manor elijahmanor

😀
View GitHub Profile
@elijahmanor
elijahmanor / amplify.contrib.js
Created October 16, 2012 17:15
AmplifyJS Contrib
amplify.store.getItem = function( key ) {
return amplify.store( key );
};
amplify.store.setItem = function( key, value ) {
amplify.store( key, value );
};
amplify.store.isEmpty = function() {
for ( var key in amplify.store() ) {
@elijahmanor
elijahmanor / filterCallback.js
Created November 26, 2012 03:29
jQuery Mobile Smart Filtering
$.mobile.listview.prototype.options.filterCallback = function( test, searchValue, item ) {
var list = item.closest( "[data-role='listview']" ),
selector, matches, compare, caseSensitive;
selector = list.data( "selector" );
if ( selector ) {
text = item.find( selector ).text();
} else {
text = item.jqmData( "filtertext" ) || item.text();
}
@elijahmanor
elijahmanor / gist:4197877
Created December 3, 2012 20:45
Quote: Clever Code
“Debugging is twice as hard as writing the code
in the first place. Therefore, if you write the
code as cleverly as possible, you are, by
definition, not smart enough to debug it.”
--Brian Kernighan
@elijahmanor
elijahmanor / kill-node.sh
Created December 5, 2012 18:16
Kill Node Processes
#!/bin/bash
echo "The following node processes were found: "
ps aux | grep node | grep -v grep | grep -v "kill-node"
nodepids=$(ps aux | grep node | grep -v grep | grep -v "kill-node" | cut -c15-20)
echo "Killing these processes now..."
for nodepid in ${nodepids[@]]}
do
@elijahmanor
elijahmanor / readme.md
Created December 13, 2012 13:40
JavaScript Design Pattern Resources
@elijahmanor
elijahmanor / readme.md
Last active December 10, 2015 09:19
Mac OS X Development Applications
  • Brackets
  • Caffeine
  • Cloud
  • CodeKit
  • Cyberduck
  • DashExpander
  • Divvy
  • Dropbox
  • Firefox
  • Google Chrome
@elijahmanor
elijahmanor / browser-sniffing.js
Last active December 10, 2015 20:48
Example of Browser Sniffing Gone Bad
// Example of browser sniffing gone bad
var ieMatch = navigator.userAgent.match( /MSIE\s(\d)/ );
if ( ieMatch && parseInt( ieMatch[ 1 ], 10 ) >= 8 ) {
console.log( "IE 8+" );
} else {
console.log( "Feature Not Supported" );
}
@elijahmanor
elijahmanor / jquery.min.js
Last active December 11, 2015 04:28
Snippet of jQuery 1.9 Minified File
...&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);
//@ sourceMappingURL=jquery.min.map
@elijahmanor
elijahmanor / images.md
Created January 18, 2013 20:54
Random Images

Animated Gifs

@elijahmanor
elijahmanor / fiddle-standard.css
Last active January 18, 2016 23:49
Tip: Animating Twitter BootStrap Icons
.icon-refresh-animate {
animation-name: rotateThis;
animation-duration: .5s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes "rotateThis" {
from { transform: scale( 1 ) rotate( 0deg ); }
to { transform: scale( 1 ) rotate( 360deg ); }