This file contains 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
// implementation of the challenge found here: http://onestepback.org/vital_testing/ | |
var TriangleClassifier = { | |
valid : function (args) { | |
var sides = [ args[0], args[1], args[2] ]; | |
if (args.length != 3) { | |
return false; |
This file contains 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
_V_.log = function() { | |
_V_.log.history = _V_.log.history || []; | |
_V_.log.history.push(arguments); | |
if (window.console) { | |
arguments.callee = arguments.callee.caller; | |
var newarr = [].slice.call(arguments); | |
(typeof console.log === "object" ? _V_.log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr)) | |
} | |
}; | |
(function(b) { |
This file contains 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
// a simple utility function for pretty printing | |
function pad(number, length) { | |
var str = '' + number; | |
while (str.length < length) { | |
str = '0' + str; | |
} | |
return str; | |
} | |
This file contains 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
/** | |
* recordAnalytics( { | |
* 'cm': { | |
* 'pageid': 'your/tag/here', // required | |
* 'searchstring': 'your search string', // optional | |
* 'categoryid': 'your_category_id' // optional | |
* 'type' : 'type of tag' // optional | |
* }, | |
* }); | |
* |
This file contains 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
// feature detection | |
isTouch = "ontouchstart" in window; | |
InputHandler = { | |
startEventType : isTouch ? "touchstart" : "mousedown", | |
moveEventType : isTouch ? "touchmove" : "mousemove", | |
endEventType : isTouch ? "touchend" : "mouseup", | |
isTouchDevice : isTouch, | |
// normalize an event object generated by a select |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<!-- Encoding --> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta> | |
This file contains 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
<!doctype html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Orientation Test</title> | |
<style> | |
body { text-align: center; } | |
@media all and (orientation:portrait) { | |
body { font-size: 35em; margin-top: .3em; } | |
} |
This file contains 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains 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
# this came from jtaby http://www.slideshare.net/jtaby/tools-and-techniques-for-faster-development slide 94 | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset %C(cyan)%an%Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" |
This file contains 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
#!/bin/bash | |
$ git push | |
Counting objects: 5, done. | |
Delta compression using up to 8 threads. | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 324 bytes, done. | |
Total 3 (delta 2), reused 0 (delta 0) | |
remote: % Total % Received % Xferd Average Speed Time Time Time Current | |
remote: Dload Upload Total Spent Left Speed |
OlderNewer