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
//* | |
$bg | |
$border-color | |
$border-radius | |
$color | |
$font-family | |
$font-size | |
$padding | |
//a | |
$a-color |
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
//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] |
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(Vorge) { | |
function YourModule() { | |
this.api = YourModule.prototype; | |
}; | |
YourModule.prototype = { | |
}; | |
Vorge.api.YourModule = YourModule; | |
})(window.Vorge); |
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
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 |
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
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 |
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
import stream from 'stream'; | |
let file = new Buffer([]); | |
const writable = new stream.Writable({ | |
write (chunk, encoding, next) { | |
file = Buffer.concat([file, chunk]); | |
next(); | |
} | |
}); |
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
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; |
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
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; |
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
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: { }, |
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
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) { |
OlderNewer