Skip to content

Instantly share code, notes, and snippets.

View ndugger's full-sized avatar

Nick Dugger ndugger

  • Minneapolis, MN
View GitHub Profile
//*
$bg
$border-color
$border-radius
$color
$font-family
$font-size
$padding
//a
$a-color
//I had two scripts, both adding their own click event handler...
//However, they were being added in an unsuitable order...
//I could not rearrange when they were called...
//How can I move the first event after the second?
var event = "click",
events = $._data(element, "events")[event]; //[event1, event2]
events.push(events.shift()); //[event2, event1]
(function(Vorge) {
function YourModule() {
this.api = YourModule.prototype;
};
YourModule.prototype = {
};
Vorge.api.YourModule = YourModule;
})(window.Vorge);
class Router {
static read(routes, path) {
let pattern = new RegExp("\{(.*)\}"),
path = path.split('/');
for (let route in routes) {
let variables = {};
if (route.match(pattern)) { // Route contains variables
Hello WebApps WG and Incubator CG members,
As you may know, we (Microsoft) have been collaborating with Mozilla on evolving the new directory
upload proposal [1]. It has recently been added to the Incubator Community Group and we are looking
forward to have everyone get involved with providing feedback on this initial proposal. If you haven't
already made a first-pass read of the spec, I invite you to take some time to do that as it is a
relatively short document that we are trying to get some more eyes on.
As we wait for the spec to stabilize, and to solve the existing interop gap with Chrome with regards
to directory uploads, we are implementing the webkitRelativePath property for the File interface and
import stream from 'stream';
let file = new Buffer([]);
const writable = new stream.Writable({
write (chunk, encoding, next) {
file = Buffer.concat([file, chunk]);
next();
}
});
import { useHSL, darkenHSL, lightenHSL, desaturateHSL } from '../theme-utils';
const stringHSL = [0, 0, 50];
const numberHSL = [39, 100, 50];
const arrayHSL = [120, 100, 30];
const objectHSL = [240, 57, 53];
const borderWidth = 2;
const padding = 3;
import { useHSL, darkenHSL, lightenHSL, desaturateHSL } from '../theme-utils';
const stringHSL = [0, 0, 50];
const numberHSL = [39, 100, 50];
const arrayHSL = [120, 100, 30];
const objectHSL = [240, 57, 53];
const borderWidth = 2;
const padding = 3;
import React, { Component } from 'react';
import * as Util from '../../util';
import Spinner from '../spinner';
export default class DataLoader extends Component {
static defaultProps = {
cache: 0,
options: { },
import http from 'http';
import url from 'url';
import qs from 'querystring';
import router from 'redshirt';
async function serve (request, response) {
const { pathname, query } = url.parse(request.url);
const route = router.find(request.method, pathname);
if (!route) {