Skip to content

Instantly share code, notes, and snippets.

View xiaoDC's full-sized avatar
🎧
(f => f(f))(coding)

fri3nd xiaoDC

🎧
(f => f(f))(coding)
View GitHub Profile
@xiaoDC
xiaoDC / gist:d0e2b90a524eee81a5e0d449364f2c7c
Created January 16, 2020 09:02 — forked from markmarkoh/gist:2969317
World Map Geo JSON data
var countries_data = {"type":"FeatureCollection","features":[
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3
@xiaoDC
xiaoDC / README.md
Created April 9, 2018 07:38 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@xiaoDC
xiaoDC / Router.re
Created March 26, 2018 09:29 — forked from bkonkle/Router.re
Reason with Koa Router
type koaRouter;
[@bs.module] external koaRouter : koaRouter = "koa-router";
[@bs.new] external newRouter : unit => koaRouter = "KoaRouter";
[@bs.send] external get : (koaRouter, string, 'a => Js.Promise.t(unit)) => unit = "";
[@bs.send] external post : (koaRouter, string, 'a => Js.Promise.t(unit)) => unit = "";
type ioRedis;
[@bs.new] [@bs.module] external ioRedis : unit => ioRedis = "ioredis";
[@bs.send] external set : (ioRedis, string, string, string, int) => Js.Promise.t(string) = "";
[@bs.send] external get : (ioRedis, string) => Js.Promise.t(Js.Nullable.t(string)) = "";
[@bs.send] external on : (ioRedis, string, unit => unit) => unit = "";

Simple Starting Point

创建 Model

var Person = Backbone.Model.extend();
@xiaoDC
xiaoDC / git_toturial
Last active August 29, 2015 14:21 — forked from guweigang/git_toturial
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "[email protected]" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://[email protected]/VT.git # clone远程仓库