Skip to content

Instantly share code, notes, and snippets.

View qwo's full-sized avatar

Stanley Zheng qwo

View GitHub Profile
@qwo
qwo / magic.js
Created December 29, 2017 12:32 — forked from Yuffster/magic.js
class Magic {
constructor(fn, a) {
this.__chain = [[fn, a]];
}
get(t, a) {
if (a == "✨✨MAGIC✨✨") return true;
if (a == "resolve") {
return () => Magic.chain(this.__chain);
}
return (...b) => {
@qwo
qwo / Fork-This-Talk.html
Last active October 24, 2017 17:23 — forked from ryanj/Fork-This-Talk.html
ATO2017 Lightning Talks - Revealjs presentation hacks with gist-reveal - http://bit.ly/ato-reveal
<section>
<h2><span class='fragment fade-right'>ryanj</span> <span class='fragment fade-up'>@</span> <span class='fragment fade-left'>red hat</span></h2>
<h1 class='fragment fade-up'>RevealJS Presentation Hacks</h1>
<h4 class='fragment fade-up'><a href="http://gist-reveal.it/57830ddbac95a9b3a6d464a03572cc74">http://gist-reveal.it/57830ddbac95a9b3a6d464a03572cc74</a></h4>
</section>
<section data-markdown>
## reveal.js
https://github.com/hakimel/reveal.js#revealjs--
@qwo
qwo / nginx.conf
Created March 13, 2017 23:38 — forked from dctrwatson/nginx.conf
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@qwo
qwo / nginx.conf
Created March 13, 2017 23:37 — forked from dctrwatson/nginx.conf
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@qwo
qwo / F.d.ts
Created January 19, 2017 15:11 — forked from puffnfresh/F.d.ts
declare namespace F {
class Either<A, B> {
private constructor();
// Hack to make A and B covariant.
private a: A;
private b: B;
static Left<A, B>(a: A): Either<A, B>;
static Right<A, B>(b: B): Either<A, B>;
@qwo
qwo / emoji.js
Last active May 17, 2017 09:22 — forked from beaugunderson/emoji.js
Scrape all emojis with descriptions from unicode.org/emoji/charts website
/*TODO Remove Tag when Done */
var request = require('request');
var cheerio = require('cheerio');
var fs = require('fs');
console.log('retrieving unicode table...');
request.get('http://unicode.org/emoji/charts/full-emoji-list.html', function (err, response, body) {
console.log('loading data...');
<ifModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteBase /gift/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php/$1 [L,QSA]
</ifModule>
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@qwo
qwo / setup_osx.sh
Last active September 21, 2017 00:49 — forked from zenorocha/.hyper.js
setup your macbook very fast using homebrew, tools of the internet and scripts. all is borrowed
#!/bin/sh
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# homebrew-cask
brew tap phinze/homebrew-cask
brew install brew-cask
# development
#star on APM and install using apm stars --install
#productivity all langs
apm install autocomplete-plus
apm install autocomplete-snippets
apm install open-last-project
apm install git-log
apm install git-history