Skip to content

Instantly share code, notes, and snippets.

View ticking-clock's full-sized avatar

Alan Kendall ticking-clock

View GitHub Profile
@justinmc
justinmc / anchor_smooth_scroll.js
Last active May 14, 2019 19:52
Anchor Smooth Scroll - Angular Directive
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Anchor Smooth Scroll - Smooth scroll to the given anchor on click
* adapted from this stackoverflow answer: http://stackoverflow.com/a/21918502/257494
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
angular.module('yourapp').directive('anchorSmoothScroll', function($location) {
'use strict';
return {
restrict: 'A',
replace: false,
@ticking-clock
ticking-clock / CSS media queries
Last active March 1, 2017 15:54
Common media queries with LESS
@media only screen and (max-width: 767px) {
}
@media only screen and (min-width: 768px) {
}
@media only screen and (min-width: 992px) {
}
@media only screen and (min-width: 1200px) {
QUnit.config.testTimeout = 4000;
/*global $ App*/
Ember.onLoad('application', function(application) {
//application.deferReadiness();
});
Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'tests',
@brentjanderson
brentjanderson / adapter.js
Last active October 23, 2019 19:12
NOTE: Not updated since early 2013 - likely will not work with modern EmberData. Ember.JS, ember-data, and socket.io adapter. Not as primitive as the initial version and it supports object creation/deletion/etc. Does not support bulk updates like the first one just to keep it simple. Does support ember-data revision 11 and does support queries/f…
/*jshint browser:true */
/*global DS:true, io:true, App:true */
(function() {
'use strict';
// Initializer for Models
window.Models = {};
console.warn("Don't pollute the global namespace with Models!");
@iansoper
iansoper / dabblet.css
Created January 5, 2012 16:07 — forked from bastianallgeier/dabblet.css
PE to use SVG as CSS background image with fallback for IE8/7/6
/**
* PE to use SVG as CSS background image with fallback for IE8/7/6
*
* Using SVG as CSS background image to display
* resolution-independent logos or icons is pretty
* awesome but does completely fail on IE8/7/6
*
* The trick:
* All three IE versions don't support rgba color values.
* By defining a rgba background color together with the