Skip to content

Instantly share code, notes, and snippets.

View LinZap's full-sized avatar
🔬
copilot

Zap LinZap

🔬
copilot
View GitHub Profile
@LinZap
LinZap / node-upgrade.sh
Last active November 9, 2017 20:53
Node.js Upgrade on QNAP
#!/bin/sh
URL=$1
[[ $URL =~ (node-v5\.8\.0-.*)\.tar\.gz$ ]] && TARFile=${BASH_REMATCH[0]} && DirName=${BASH_REMATCH[1]}
[[ $TARFile == "" ]] && echo "url is wrong" && exit
NodeJSPath=$(/sbin/getcfg nodejs Install_Path -f /etc/config/qpkg.conf)
wget --no-check-certificate $URL
@LinZap
LinZap / Progress.php
Created February 17, 2016 13:39
display Progress (PHP ver.)
<?php
class Progress{
private $max;
private $value;
private $length = 10;
private $style = "=";
/*
@LinZap
LinZap / FBI\install.bat
Created January 29, 2016 04:22
The image FBI install on Docker (Windows ver.)
@echo off
echo Load tar...
.\docker.exe load < %1%
echo Run Image...
.\docker.exe run -d -p 9876:80 -p 5433:5432 --name=FBI fbi:v13
pause
@LinZap
LinZap / Front-end-Developer-Interview-Questions-TC.md
Created November 18, 2015 13:11 — forked from hanksudo/Front-end-Developer-Interview-Questions-TC.md
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@LinZap
LinZap / app.js
Last active November 17, 2015 04:46
穩定版 v2.2
function main(){
page.base(i3s_awesome.base);
page('/', function(){
re_render({params:["首頁"]});
});
page(/^\/([\D\/]+)$/, function(context){
@LinZap
LinZap / index.js
Created November 10, 2015 17:36
Google Search Cralwer (Zap Ver.)
var g = require("./node-g-search"),
db = require("./node-pg-promise"),
url = require("url");
var keyword = '暨南大學';
var p = db.connect({
user:'postgres',
password: 'postgres',
@LinZap
LinZap / selenium-scrollToEnd.js
Last active November 7, 2015 23:42
scroll to end and save web source
var webdriver = require('selenium-webdriver'),
By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until,
fs = require('fs');
// keyword
var keyword = "不是鐵馬";
// open chrome
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
@LinZap
LinZap / selenium-quickstart.js
Created November 7, 2015 00:29
selenium-webdriver quick start
var webdriver = require('selenium-webdriver'),
By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until;
// open chrome
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
// outset
@LinZap
LinZap / index.js
Last active March 16, 2018 10:43 — forked from edokeh/index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@zsup
zsup / ddd.md
Last active April 2, 2025 23:33
Documentation-Driven Development (DDD)

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.