Skip to content

Instantly share code, notes, and snippets.

View MarshallChen's full-sized avatar
🎯
Focusing

Marshall MarshallChen

🎯
Focusing
View GitHub Profile
{
"bold_folder_labels": true,
"caret_extra_width": 2,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Hack",
"font_options":
[
"Roboto Mono Thin"
@MarshallChen
MarshallChen / makeConfig.js
Created January 22, 2016 09:35
Webpack config
import autoprefixer from 'autoprefixer';
import config from '../src/server/config';
import constants from './constants';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import path from 'path';
import webpack from 'webpack';
import WebpackIsomorphicToolsPlugin from 'webpack-isomorphic-tools/plugin';
import webpackIsomorphicAssets from './assets';
const loaders = {
@MarshallChen
MarshallChen / generator.js
Created June 29, 2015 05:31
generator function
function asyncDouble(x) {
var deferred = Promise.defer();
setTimeout(function() {
deferred.resolve(x*2);
}, 1000);
return deferred.promise;
}
function consumer(generator){
var cursor = generator();
/** @jsx React.DOM */
var React = require('react');
var httpReq = require('./httpRequest');
var formValidator = require('./formValidator');
var ERRORS = {
FIRST_NAME_BLANK: 'First name is required.',
LAST_NAME_BLANK: 'Last name is required.',
MAIL_BLANK: 'email is required.',
MAIL_INVAILD: 'Invalid Email address',
MAIL_USED: 'Email has been occupied',
// We need a bunch of dependencies, but they all do an important
// part of this workflow
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var watchify = require('watchify');
var reactify = require('reactify');
var gulpif = require('gulp-if');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
@MarshallChen
MarshallChen / forge_error.log
Created March 12, 2013 08:17
`forge run android` error - error_log
2013-03-12 15:59:38,170 [ INFO] Forge tools running at version 3.3.43
2013-03-12 15:59:38,171 [ DEBUG] Checking for update zip...
2013-03-12 15:59:38,342 [ DEBUG] ignoring non-target directory reload
2013-03-12 15:59:38,342 [ DEBUG] Enabled platforms: ['android']
2013-03-12 15:59:38,342 [ DEBUG] Using configuration file value u'D:/Android/adt-bundle-windows/sdk' for android.sdk
2013-03-12 15:59:38,342 [ DEBUG] Forge build tools version: 3.3.43
2013-03-12 15:59:38,342 [ DEBUG] main: {"server": "https://trigger.io/api/"}
2013-03-12 15:59:38,342 [ DEBUG] port: 38394
2013-03-12 15:59:38,342 [ DEBUG] GET https://trigger.io/api/auth/loggedin
2013-03-12 15:59:52,607 [ ERROR] Something went wrong that we didn't expect:
@MarshallChen
MarshallChen / gist:4063691
Created November 13, 2012 03:01
GFW Detection widget
<script src="https://zh.greatfire.org/gf_widget" type="text/javascript"></script>