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
$("input[type=number]").keydown(function(event) { | |
// Allow: backspace, delete, tab, escape, enter and . | |
if ( $.inArray(event.keyCode,[46,8,9,27,13,190]) !== -1 || | |
// Allow: Ctrl+A | |
(event.keyCode == 65 && event.ctrlKey === true) || | |
// Allow: home, end, left, right | |
(event.keyCode >= 35 && event.keyCode <= 39)) { | |
// let it happen, don't do anything | |
return; | |
} |
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
<script> | |
if (/\bMSIE 6/.test(navigator.userAgent) && !window.opera) { | |
document.documentElement.className+=' ie6'; | |
} else if (navigator.appVersion.indexOf("MSIE 7.") != -1) { | |
document.documentElement.className+=' ie7'; | |
} else if (navigator.appVersion.indexOf("MSIE 8.") != -1) { | |
document.documentElement.className+=' ie8'; | |
} else if (navigator.appVersion.indexOf("MSIE 9.") != -1) { | |
document.documentElement.className+=' ie9'; | |
} else if (/*@cc_on!@*/false && document.documentMode === 10) { |
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
/* Based on | |
* - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co> | |
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1) | |
*/ | |
var ExcelFormulas = { | |
PVIF: function(rate, nper) { | |
return Math.pow(1 + rate, nper); | |
}, |
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
git rm --cached -r src/dependencies/ |
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
function guid() { | |
var strguid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); | |
return strguid; | |
} |
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
sudo su | |
mkdir /mnt/timecapsule | |
echo "//timeCapsuleIp/Data /mnt/toshiba cifs user= timecapsuleUsername,pass= timecapsuleUserPassword,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0" >> /etc/fstab |
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
$ setxkbmap -option apple:badmap | |
# Place that command into ~/.bashrc file to have it run automatically when you log in. |
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
window.PointerEvent ? "pointer" : "ontouchstart" in window ? "touch" : "mouse"; |
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
.center_absolute_positioned { | |
position: absolute; | |
margin-left: auto; | |
margin-right: auto; | |
left: 0; | |
right: 0; | |
} |
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
<(\w+)\b(?:\s+[\w\-.:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[\w\-.:]+))?)*\s*/?>\s*</\1\s*> |