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
/* | |
====================== | |
USAGE | |
====================== | |
createLoadPane is a simple function that handles creation and positioning, | |
as well as text options for adding "contextual loaders" into the dom -- | |
a loader that covers a certain area where content may be loading via ajax. | |
This works with the box-model and takes the basic discrepencies into account. |
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
// the input type = number looks uncentered, even with the standard text-align:center -- because of the width of the buttons on the right. This will not be technically centered, but appear visually so. | |
// percentages account for variable size | |
input[type="number"] { | |
text-align:center; | |
text-indent: 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
// you can put your functions outside (my preference) or inside the object itself. | |
function foo() { | |
console.log('foo!'); | |
} | |
function bar() { | |
console.log('bar!'); | |
} |
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 global module and namespace, preferably separated by individual files for each sub-module | |
var myGlobalObject = { | |
category: { | |
function1: function() {alert('function 1!');}, | |
function2: function() {alert('function 2!');}, | |
function3: function() {alert('function 3!');}, | |
function4: function() {alert('function 4!');} | |
} | |
}; |
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
alias rebpages="git checkout gh-pages && git rebase master && git push origin gh-pages && git checkout 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
alias pserve="open /Applications/Google\ Chrome.app http://localhost:8001 && python -m SimpleHTTPServer 8001" |
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 href="#" data-load-css="wtf.css" data-load-fn="wtfFn">Some module link</a> | |
<form action=""> | |
<button data-load-css="wtf2.css" data-load-fn="wtf2Fn">Yeah buddy</button> | |
</form> | |
var moduleFuncs = { | |
wtfFn: function() {}, | |
wtf2Fn: function() {} | |
}; |
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
// To generate the html, I use an expansion tool like Emmett and run: | |
// ul#fuzzbuzz>li$num*100 | |
@mixin fizzbuzz-content($num) { | |
@if $num % 15 == 0 { | |
content: 'FizzBuzz'; | |
} | |
@elseif $num % 5 == 0 { | |
content: 'Buzz'; | |
} |
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 τ = Math.PI * 2; | |
var Θ = 30; | |
var λ = function(){}; | |
var ψ = ['z^0', 'z^1', '...']; | |
var Δ = function(thing1, thing2){return Math.abs(thing1-thing2);}; | |
alert(Θ); | |
alert(τ); | |
alert(λ); | |
alert(ψ); |
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
// MIT LICENSE - use for whatever! | |
@mixin transition($property, $time, $easing) { | |
-moz-transition: $property $time $easing; | |
-webkit-transition: $property $time $easing; | |
-o-transition: $property $time $easing; | |
transition: $property $time $easing; | |
} | |
@mixin column-count($gap, $count) { |
OlderNewer