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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<div class="n-btn-group"> | |
<div class="col-xs-4 n-btn"> | |
<button type="submit" class="btn btn-success">Save</button> | |
</div> | |
<div class="col-xs-4 n-btn"> | |
<button class="btn btn-warning">Reset</button> | |
</div> | |
<div class="col-xs-4 n-btn"> | |
<button class="btn btn-danger">Delete</button> | |
</div> |
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
App.DateSelectionView = Em.View.extend({ | |
templateName: "date-selection", | |
tagName: "div", | |
classNames: ['date-selector','clearfix'], | |
classNameBindings: ['showLabels::no-labels'], | |
date: null, | |
showLabels: true, | |
timezone: 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
var LS = function() { | |
/* | |
LocalStorageHandler Class | |
- emulates a more user friendly interface | |
for the LocalStorage API | |
*/ | |
var LocalStorageHandler = function() { | |
this.key = "local"; |
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
/* ---------------------------------------------------------------------------------------------------- | |
SCSS Form Reset Helpers - Forked from: https://gist.github.com/anthonyshort/552543 | |
Intended usage: | |
- MIXINS: for very specific use cases, when you dont want to reset absolutly all the forms, very verbose output. | |
- PLACEHOLDER SELECTORS: use as extending classes. Less verbose, more generic overrides. | |
A couple of things to watch out for: |
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 lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | |
|| window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
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
/* | |
* jQuery utilities | |
* Takes in a form element and rips out all the values in a simple key-value pair | |
*/ | |
$(function() { | |
$.fn.parseFormFields = function(props) { | |
// define some default settings with default values |
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
/* | |
@description A function that takes in some headers as a string containing newlines. | |
It will split the string on its newlines, and then will split it into | |
a key-value pair for easy deploying into HTML. | |
@param headerStr [String] | |
@returns headers [Array] | |
*/ | |
function parseHeaderString(headerStr) { |
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
/* | |
defines base colors, all colors to use are described in this map. | |
works pretty well with a color palette generator like http://coolors.co/ | |
palette in this example: https://coolors.co/def200-242038-315659-e3efeb-028090 | |
MAP ui-colors ( | |
[STRING] color-name: [HEX] hex-value | |
) | |
*/ |
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
/* | |
SASS Class helpers | |
to make these work, include them in some imported file (like variables.scss or mixins.scss) and | |
extend them on classes like so: | |
ul { | |
@extend %reset-list; | |
} |
OlderNewer