Skip to content

Instantly share code, notes, and snippets.

View henry40408's full-sized avatar
🌴
Relaxed

Heng-Yi Wu henry40408

🌴
Relaxed
  • Taipei, Taiwan
  • 01:54 (UTC +08:00)
View GitHub Profile
@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 / rustconf-2019-1.md
Last active January 25, 2024 10:18
RustConf 2019 雲參訪錄(1)

RustConf 2019 雲參訪錄(1)

RustConf 是 Rust 社群年度最重要的研討會之一,從 [Rust 在 2015 年 1.0 版正式發布][rust-1.0]之後,[2016][2016]、[2017][2017]、[2018][2018] 連續三年都在美國舉辦,今年當然不例外,八月底在 NBA 球迷稱作 Rip City 的波特蘭舉行。由於歷史悠久,加上 Rust 社群在美國較為活躍,許多 Rust Core Team 成員都會共襄盛舉,這場研討會是 Rust 開發者絕對不能錯過的盛事。

RustConf 歷年來皆由 [Tilde Inc.][tilde] 旗下的 [Skylight][skylight] 主辦,Skylight 是一個 Rails profiler in production 的解決方案,產品中關鍵的模組用了不少 Rust。

好了,介紹完背景,這篇文章主要是紀錄小弟我「在 YouTube 上」觀看演講的心得分享,當然,RustConf 除了主要的演講軌,還有不少場邊工作坊等小活動,這就留給看倌明年到實地考察啦!

import React from 'react';
import { TextInput as Input } from 'react-native';
export default class TextInput extends React.Component {
static defaultProps = {
onFocus: () => { },
}
constructor(props) {
super(props);
@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,基於各種莫名其妙的狀況)

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@dideler
dideler / example.md
Last active February 17, 2024 20:24
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.

The program below can take one or more plain text files as input. It works with python2 and python3.

Let's say we have two files that may contain email addresses:

  1. file_a.txt
foo bar
ok ideler.dennis@gmail.com sup
 hey...user+123@example.com,wyd
hello world!
@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!