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
/* | |
* From http://ifandelse.com/its-not-hard-making-your-library-support-amd-and-commonjs/ | |
* http://ricostacruz.com/cheatsheets/umdjs.html | |
*/ | |
(function (root, factory) { | |
if(typeof define === "function" && define.amd) { | |
// Now we're wrapping the factory and assigning the return | |
// value to the root (window) and returning it as well to | |
// the AMD loader. |
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
// from : http://qnimate.com/javascript-limit-function-call-rate/ | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, | |
args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); |
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 | |
alias g='git' | |
alias gs='git status' |
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
<html> | |
<head> | |
<style> | |
.item {width:300px; display: inline-block; } | |
.item .itemtitle {font-weight:bold; font-size:2em;} | |
.hidden {display:none;} | |
</style> | |
</head> | |
<body> | |
<h1>Amalgam Comics Characters</h1> |
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 getCoordinate = function(elemId, parentId){ | |
var element = document.getElementById(elemId); | |
var context = document.getElementById(parentId); | |
var bodyRect = context.getBoundingClientRect(), | |
pointPos = element.getBoundingClientRect(), | |
offsetY = pointPos.top - bodyRect.top; | |
offsetX = pointPos.left - bodyRect.left; | |
centerX = offsetX + pointPos.width / 2; |
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
# SSH Agent | |
# Note: ~/.ssh/environment should not be used, as it | |
# already has a different purpose in SSH. | |
# source : https://www.schoonology.com/technology/ssh-agent-windows/ | |
env=~/.ssh/agent.env | |
# Note: Don't bother checking SSH_AGENT_PID. It's not used | |
# by SSH itself, and it might even be incorrect | |
# (for example, when using agent-forwarding over SSH). |
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
/** | |
* @fileOverview Gruntfile tasks. These tasks are intended to help you when modifying the template. If you are | |
* just using the template, don't sweat this stuff. To use these tasks, you must install grunt, if you haven't already, | |
* and install the dependencies. All of this requires node.js, of course. | |
* | |
* Install grunt: | |
* | |
* npm install -g grunt-cli | |
* | |
* Then in the directory where you found this file: |
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>Kitchen sink</title> | |
<style> | |
body { margin: 0 5%; } | |
.colA { width: 45%; float: left; margin-right: 5%; } | |
.colB { width: 45%; float: left; } |
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
<article> | |
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> | |
<h5>Heading 5</h5> | |
<h6>Heading 6</h6> | |
<section> | |
<h1>Heading 1 (in section)</h1> |
NewerOlder