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 -r --cached some-directory | |
git commit -m 'Remove the now ignored directory "some-directory"' | |
git push origin master |
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
// Arrange | |
MyObject saveObject; | |
mock.Setup(c => c.Method(It.IsAny<int>(), It.IsAny<MyObject>())) | |
.Callback<int, MyObject>((i, obj) => saveObject = obj) | |
.Returns("xyzzy"); | |
// Act | |
// ... | |
// Assert |
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
$(document).mousemove(function (event) { | |
console.log(event); | |
var offsetPercentageX = Math.floor(event.clientX / window.innerWidth * 20) + "%"; | |
var offsetPercentageY = Math.floor(event.clientY / window.innerHeight * 20) + "%"; | |
$("section.content").css("background-position", offsetPercentageX + " " + offsetPercentageY); | |
}); | |
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> | |
<title></title> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script> | |
// set refresh rate to 60hz | |
var refreshRate = 1000 / 60, | |
debounceThreshold = 500, | |
resizeEventStack = [], |
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
// flexbox.less | |
// https://gist.github.com/stephen-james/6493651 | |
.flexbox(@inline : false) when (@inline) | |
{ | |
// support the 2009 Draft | |
display : -webkit-inline-box; | |
display : -moz-inline-box; | |
display : inline-box; |
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 type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-12345678-1']); | |
_gaq.push(['_setDomainName', 'yoursite.com']); | |
_gaq.push(['_addIgnoredRef', 'yoursite.com']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
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(){ | |
var documentElement = document.documentElement, | |
matchesSelector = | |
documentElement.matchesSelector || | |
documentElement.mozMatchesSelector || | |
documentElement.webkitMatchesSelector || | |
documentElement.msMatchesSelector || | |
documentElement.oMatchesSelector; | |
if (!matchesSelector) { |
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
[merge] | |
tool = webstorm | |
[diff] | |
tool = webstorm | |
[difftool "webstorm"] | |
cmd = webstorm diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") | |
trustExitCode = false | |
[mergetool "webstorm"] | |
cmd = webstorm merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = 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
var GothicArchFactory = function() { | |
var _60degrees = 1.04719755, // radians for Math trig functions | |
_30degrees = 0.523598776, | |
_createArch = function(archWidth, archHeight) { | |
// this private method creates and returns the arch... | |
// the arch knows it's dimensions and can draw itself on | |
// a canvas | |
return { | |
archWidth : archWidth, | |
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($,throttledResizeEvent){ | |
var throttle = function (func, wait) { | |
var context, | |
args, | |
result, | |
timeout, | |
previous; | |
wait = wait || 1000 / 60; |