Skip to content

Instantly share code, notes, and snippets.

@sacarino
sacarino / controllers.application.js
Last active March 23, 2017 03:58
Playing around with an accelerating spinner
import Ember from 'ember';
var pfx = ["webkit", "moz", "MS", "o", ""];
export default Ember.Controller.extend({
appName: 'spinner demo',
isLoading: true,
speed: null,
startEngine: false,
@sacarino
sacarino / regex.txt
Last active March 18, 2017 03:45
Incredibly useful regex for URL parsing
(http[s]?:\/\/)?([^\/\s]+)\/?([^\/\s]+)\/(.*)\?(.*)\#(.*)\b
example here: https://regex101.com/r/QJdP9m/1
Full match: https://www.somehost.com/path/that/you/can/target?query=butwhy#because
Group 1: https://
Group 2: www.somehost.com
Group 3: path
Group 4: that/you/can/target
Group 5: query=butwhy