Skip to content

Instantly share code, notes, and snippets.

View chilijung's full-sized avatar
👋
Focusing

Howard Chi chilijung

👋
Focusing
View GitHub Profile
@wy36101299
wy36101299 / climate_crawler.py
Last active November 7, 2018 07:34
台灣中央氣象局觀測資料爬取
# 產生data List , data List為兩年份
def date():
month31=[1,3,5,7,8,10,12]
month30=[4,6,9,11]
year2=['2013','2014']
nday31=range(1,32)
nday30=range(1,31)
nday28=range(1,29)
day10=['01','02','03','04','05','06','07','08','09']
month12=day10+['10','11','12']
@mbostock
mbostock / .block
Last active February 9, 2016 01:56
Random Search
license: gpl-3.0
@yhsiang
yhsiang / gulpfile.js
Last active July 21, 2018 03:52 — forked from chriskjaer/gulpfile.js
switch node-sass to stylus
var gulp = require('gulp'),
gutil = require('gulp-util'),
stylus = require('gulp-stylus'),
uglify = require('gulp-uglify'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'),
tinylr = require('tiny-lr'),
express = require('express'),
app = express(),
var http = require('httpsync')
, fs = require('fs');
var getLocation = function (address, callback) {
var url, req, res, results, location;
url = 'http://maps.googleapis.com/maps/api/geocode/json?address='+address+'&sensor=false';
req = http.get(url);
res = req.end();
if(JSON.parse(res.data).status === 'OK') {
results = JSON.parse(res.data).results[0];

I wrote this in early January 2012, but never finished it. The research and thinking in this area led to a lot of the design of Yeoman and talks like "Javascript Development Workflow of 2013", "Web Application Development Workflow" and "App development stack for JS developers" (surpisingly little overlap in those talks, btw).

Now it's June 2013 and the state of web app tooling has matured quite a bit. But here's a snapshot of the story from 18 months ago, even if a little ugly and incomplete. :p


In the beginning…

  • Intro to tooling
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@dzenkovich
dzenkovich / slider.js
Created June 19, 2013 11:38
Very simple upgrade to very simple basic 'slider' bar in JavaScript and CSS :) originating from this gist https://gist.github.com/kosso/1118840
var Slider = function(options){
var bar,
slider,
toggle,
percent,
that = this;
function _init(options){
_construct();

Docker PostgreSQL How-To

How to use [zaiste/postgresql][1] Docker container.

Docker >= 0.5.0 required.

docker pull zaiste/postgresql
@clkao
clkao / gist:5468139
Last active December 16, 2015 17:09
「全國村里界圖(台澎金馬)-經緯度/TW-07-301000100G-613995」修正
敬啟者,
貴單位提供之全國村里界圖資「全國村里界圖(台澎金馬)-經緯度/TW-07-301000100G-613995」有如下問題:
1. 村里名稱為 big5 外字集者,出現■或?。
2. 2013 年三月份新增之竹北市四里之 V_ID 仍為分割前「十興里」之 V_ID。
3. 不連續村里(灣雅村、聖湖里)應為同一 multi-polygon feature。
4. 外島村里未給定 V_ID, VILLAGE_ID
5. 外島村里未更新(金門縣金城鎮金城里已經分割為不同里,根據 http://www.dgbas.gov.tw/public/Attachment/812159284671.pdf)
6. 新竹市古賢里為兩相鄰 feature,應合併之。
@wwwy3y3
wwwy3y3 / db_con.js
Last active December 16, 2015 09:28
async database connection manager, singleton pattern
var path= require('path');
//var cpath= path.resolve(__dirname, '..', '..', '..', 'node_modules', 'cassandra-client');
var Connection = require('cassandra-client').Connection;
var EventEmitter = require('events').EventEmitter;
/*
* four stages of connection
* 1. restart the server, connection is null
* 2. new Connection(options), but not yet connect, (client= null, doesn't have con, nothing in validators)