Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Send me an email

Cameron Roe cameronroe

💭
Send me an email
View GitHub Profile
@cameronroe
cameronroe / moment-timezone-data.js
Created Mar 27, 2014
Add to lib/moment-timezone/tz
View moment-timezone-data.js
moment.tz.add({
"zones": {
"Africa/Abidjan": [
"-0:16:8 - LMT 1912 -0:16:8",
"0 - GMT"
],
"Africa/Accra": [
"-0:0:52 - LMT 1918 -0:0:52",
"0 Ghana %s"
],
View countries.json
[{
"name": "Afghanistan",
"code": "AF"
}, {
"name": "Åland Islands",
"code": "AX"
}, {
"name": "Albania",
"code": "AL"
}, {
View gist:34331bc231cc87eb8138
// Facebook Border
.facebook-border {
border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
}
// Google Border
.google-border {
border: 1px solid #d8d8d8;
border-bottom-width: 2px;
View mixins.scss
// Appearance
// Default styling to form elements
@mixin appearance ($value) {
-webkit-appearance: $value;
-moz-appearance: $value;
appearance: $value;
}
@mixin arrow($direction: up, $size: 5px, $color: #444) {
width: 0;
@cameronroe
cameronroe / aq.js
Last active Aug 29, 2015
Async Function Queueing
View aq.js
var _aq = [],
funcs = [function () {
console.log('Handler 1 executed.');
}, function () {
console.log('Handler 2 executed.');
}];
_aq.push(funcs);
(function() {
@cameronroe
cameronroe / _cs-dob.html
Last active Aug 29, 2015
CrowdSurge Date of Birth Directive
View _cs-dob.html
<ng-form name="date_of_birth" class="form-inline cs-dob" ng-class="{'has-error': date_of_birth.$invalid && submitted}">
<div class="form-group">
<select name="month" class="form-control" ng-model="dob.month" ng-options="n for n in [] | range:1:12" required>
<option value="">MM</option>
</select>
</div>
<div class="form-group">
<select name="day" class="form-control" ng-model="dob.day" ng-options="n for n in [] | range:1:31" required>
<option value="">DD</option>
</select>
View jp.js
'use strict';
angular.module('judasPriest.directives')
.directive('judasPriest', ['$window',
function ($window) {
return {
restrict: 'C',
link: function (scope, el, attrs) {
// canvas els
View sass-toolbox.scss
/*
* Sass Toolbox
* A useful collection of Sass functions and mixins
* http://zerosixthree.se/8-sass-mixins-you-must-have-in-your-toolbox/
*/
// rem font-size with pixel fallback
@function calculateRem($size) {
$remSize: $size / 16px;
@return $remSize * 1rem;
View package.json
{
"devDependencies": {
"gulp-sass": "latest",
"gulp-uglify": "latest",
"gulp-coffee": "latest",
"gulp-concat": "latest",
"gulp-connect": "latest",
"gulp-livereload": "latest",
"gulp-util": "latest",
"node-bourbon": "latest",
@cameronroe
cameronroe / jquery-hover-feedback.js
Last active Aug 29, 2015
jquery hover feedback fix
View jquery-hover-feedback.js
/*
<div class="box"></div>
When hovering over this simple box div, the class "big" will be added to the box.
It will be animated over 300ms with a easeInOutQuint easing function. The problem
occurs when you quickly mouse in and out of the element. It will continue to build up
animations in a queue. To stop the queue, we must pass a complete callback that will
fire after a single animation has been run. When it finally does end, the existing queue
of animations on the element will be stopped, and the last animation will play one last time,
as a final animation. Passing false as the first argument will keep the animation queue available