Skip to content

Instantly share code, notes, and snippets.

View weihanglo's full-sized avatar

Weihang Lo weihanglo

View GitHub Profile
@weihanglo
weihanglo / fed-toolchain.md
Last active July 28, 2021 01:57
Front End Development Toolchain

Front End Development Toolchain

React Tech Stack

在大前端的時代,開發 Web app 不再像以前使用一個 jQuery 的 CDN 這麼容易,從 html 模板的抉擇,css 預處理器的挑選,Javascript 模組化的方法,自動化工具的使用等等,都是一門學問。本文將從建置基本的前端開發環境起頭,簡單介紹個人愛用現代常用的前端開發工具。

(撰於 2017-03-10)

Contents

@weihanglo
weihanglo / 4-podcasts-software-engineers-may-love.md
Last active March 31, 2021 12:07
4 Podcasts Software Engineers May Love

4 Podcasts Software Engineers May Love

Image by Nick Youngson CC BY-SA 3.0

As a non-native English speaker, I often try several methods to improve my English skills. Listening to podcasts is one of the most interesting way to practice English, especially with fascinating topics I indulge in.

Therefore, I pick some of my favorite podcasts about software engineering to share with you. Enjoy these awesome shows and don't forget to give them some feedback.

@weihanglo
weihanglo / answers-to-cherny-interview-questions.md
Last active March 2, 2021 06:47
Answers to Cherny's Interview Questions

Answers to Cherny's Interview Questions

這份面試題出自[於此][questions-source],是從 [/r/Frontend/][reddit-frontend] 連結過去的,看到如此自豪的標題和簡介,便手癢來作答。結果寫完基礎概念篇,才發現這份題目在 reddit 上被批評到體無完膚,與現代前端技術棧相差頗大。不過,一些核心概念還是挺重要的,在此分享小弟的答案,有任何錯誤,請各位不吝賜教。

(撰於 2017-07-26)

Concepts

@weihanglo
weihanglo / rust-ownership-and-references.md
Last active February 18, 2021 08:50
Rust: Ownership and References

Rust: Ownership and References

This is a series of quick notes about the fundamentals of the Rust programming language. It would cover parts of basic concepts and patterns in Rust. As a Rust begineer and a non-native English speaker, I may make some silly mistakes in my notes. Please contact me if there are some misleading words.

(written on 2018-09-30)

Ownership and References

@weihanglo
weihanglo / openssl-cheatsheet.sh
Last active December 5, 2020 02:01
OpenSSL CheatSheet
# Create X509 self-signed certificate.
openssl req \
-newkey rsa:2048 -nodes -keyout cert.key \
-x509 -days 365 -out cert.pem
# Convert from PEM format to DER.
openssl pkcs12 \
-inkey cert.key -in cert.pem \
-export -out cert.pfx
@weihanglo
weihanglo / xor_shift64.rs
Last active August 26, 2020 07:34
Single pseudo-random generator in Rust
pub struct XorShift64 {
a: u64,
}
impl XorShift64 {
pub fn next(&mut self) -> u64 {
let mut x = self.a;
x ^= x << 13;
x ^= x >> 7;
x ^= x << 17;
@weihanglo
weihanglo / k8s-autoscaling.md
Last active March 31, 2020 14:53
Kuberenetes Autoscaling 相關知識小整理

Kuberenetes Autoscaling 相關知識小整理

K8s 有好用的 autoscaling 功能,但你知道除了 pod 之外,node 也可以 auto scaling 嗎?帥,你知道就不用分享了啊 🚬

本文以重點整理的方式,先介紹目前常見的 Autoscaler,再介紹一些防止 pod 被亂殺的 config。

(撰於 2020-03-23,基於 Kubernetes 1.17,但 Api Versions 太多請自行查閱手冊)

@weihanglo
weihanglo / days-with-internet-explorer-2.md
Last active February 3, 2020 06:20
與 IE 相處的日子二:淺談網頁相容性

與 IE 相處的日子二:淺談網頁相容性

還記得之前整理的 [IE 相容性][days-with-internet-explorer] 一文嗎?筆者最近參與公司新版 Web App 架構規劃與開發,又遇到許多相容性的問題,連新版瀏覽器也無法倖免。就讓我們再次探討瀏覽器相容性吧!

(撰於 2017-12-09,基於各種莫名其妙的狀況)

@weihanglo
weihanglo / swift-generics.md
Last active October 24, 2018 04:19
Generics in Swift

Generics in Swift

泛型程式設計(Generic Programming) 是經典的程式設計典範之一,不論是老牌的 C++,還是潮潮的 TypeScript,都能一睹泛型的風采。近年來,程式設計吹的是 static typing 風,泛型又開始被廣泛討論。

本篇將簡單介紹泛型的背景,再來理解並學習 Swift 語言的泛型寫法。

(撰於 2017-05-08,基於 Swift 3.1)

Keybase proof

I hereby claim:

  • I am weihanglo on github.
  • I am weihanglo (https://keybase.io/weihanglo) on keybase.
  • I have a public key whose fingerprint is 7D84 EA07 47C1 240C 2A16 D2A6 D7DB F189 825E 82E7

To claim this, I am signing this object: