Skip to content

Instantly share code, notes, and snippets.

View gy0857478's full-sized avatar
🏀
On vacation

Stanley gy0857478

🏀
On vacation
View GitHub Profile
@FlandreDaisuki
FlandreDaisuki / sum.js
Last active May 1, 2020 14:18
應該是最美的 currying sum
// ref: https://t.me/JavaScriptTw/52631
function sum(...args) {
const total = args.reduce((p, c) => p + c);
const sumFunc = sum.bind(null, total);
sumFunc.valueOf = () => total;
return sumFunc;
}
@gy0857478
gy0857478 / cloudSettings
Last active September 17, 2020 15:54 — forked from jesty/computeHeading.js
Compute heading
{"lastUpload":"2020-09-17T15:53:58.876Z","extensionVersion":"v3.4.3"}
@freedmand
freedmand / tester.js
Last active November 7, 2018 11:13
JavaScript unit testing in under 30 lines
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@Po-Jen
Po-Jen / swe-interview-prep.md
Created May 20, 2018 04:03
軟體工程師面試資源最簡整理與技巧分享 for 柏豪

軟體工程師面試資源最簡整理與技巧分享

前言

只要是在 CS 產業,想要當軟體工程師,基本的資料結構和演算法功力是必須要時時打磨的,這次就整理一些好用的工具,而且盡量把資源最小化,讓大家在準備面試時有足夠資源,又不會被太多資料弄得暈頭轉向。

線上練習寫 code 網站

@doggy8088
doggy8088 / Angular 2 開發實戰:新手入門篇 實作環境說明.md
Last active May 21, 2022 13:35
Angular 2 開發實戰:新手入門篇實作環境說明

Angular 2 開發實戰:新手入門篇 實作環境說明

實作環境說明

為了能讓大家能在課堂上順利地進行實作,請先將需要的軟體全部安裝好,以下是安裝的相關軟體與安裝步驟與說明。

[ 作業系統 ]

@thomasjao
thomasjao / 臺灣郵遞區號
Last active January 7, 2019 09:44
各縣市郵遞區號以 JSON 表示
台北市 = {"中正區":"100","大同區":"103","中山區":"104","松山區":"105","大安區":"106","萬華區":"108","信義區":"110","士林區":"111","北投區":"112","內湖區":"114","南港區":"115","文山區":"116"};
新北市 = {"萬里區":"207","金山區":"208","板橋區":"220","汐止區":"221","深坑區":"222","石碇區":"223","瑞芳區":"224","平溪區":"226","雙溪區":"227","貢寮區":"228","新店區":"231","坪林區":"232","烏來區":"233","永和區":"234","中和區":"235","土城區":"236","三峽區":"237","樹林區":"238","鶯歌區":"239","三重區":"241","新莊區":"242","泰山區":"243","林口區":"244","蘆洲區":"247","五股區":"248","八里區":"249","淡水區":"251","三芝區":"252","石門區":"253"};
基隆市 = {"仁愛區":"200","信義區":"201","中正區":"202","中山區":"203","安樂區":"204","暖暖區":"205","七堵區":"206"};
宜蘭縣 = {"宜蘭市":"260","頭城鎮":"261","礁溪鄉":"262","壯圍鄉":"263","員山鄉":"264","羅東鎮":"265","三星鄉":"266","大同鄉":"267","五結鄉":"268","冬山鄉":"269","蘇澳鎮":"270","南澳鄉":"272"}:
新竹市 = {"東區":"300", "北區":"300", "香山區":"300"};
新竹縣 = {"湖口鄉":"303","新豐鄉":"304","新埔鎮":"305","關西鎮":"306","芎林鄉":"307","寶山鄉":"308","竹東鎮":"310","五峰鄉":"311","橫山鄉":"312","尖石鄉":"313","北埔鄉":"314","峨眉鄉":"315"};
桃園市 = {"中壢區":"320","平鎮區":"324","龍潭區":"325","楊梅區":"326","新屋區":"327","觀音
@jshaw
jshaw / index.html
Created February 20, 2015 21:56
Google Streetview Example
<!DOCTYPE html>
<html>
<head>
<title>Custom Street View panorama tiles</title>
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
@HabaCo
HabaCo / 多型、覆寫、多載
Last active September 24, 2022 12:36
讓人頭痛的polymorphic(多型)、overriding(覆寫)、overloading(多載)
polymorphism(多型)、overriding(覆寫)、overloading(多載)
// Superclass(父類別)
class Animal(){
void sound(){
}
}
// Subclass(子類別)
class Dog extends Animal{
@edokeh
edokeh / index.js
Last active May 3, 2024 08:18
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@kad1r
kad1r / CreateThumbFromVideo.cs
Created September 26, 2013 21:59
Create a thumbnail image from video with ffmpeg with .net
using System;
using System.Diagnostics;
using System.IO;
using System.Web;
namespace WebApp.HelperClass
{
public class CreateThumbFromVideo
{
/// <summary>