Skip to content

Instantly share code, notes, and snippets.

View AlphaWong's full-sized avatar
🇭🇰
I go to work by MTR

Alpha AlphaWong

🇭🇰
I go to work by MTR
View GitHub Profile
@AlphaWong
AlphaWong / nerd_fonts.sh
Created August 18, 2022 06:35 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font
@AlphaWong
AlphaWong / Install.txt
Created February 26, 2021 16:01 — forked from soderlind/Install.txt
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@AlphaWong
AlphaWong / supervisord-example.conf
Created February 11, 2020 08:08 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@AlphaWong
AlphaWong / Travis CI local install
Created November 16, 2019 09:46 — forked from jarun/Travis CI local install
How to install Travis CI locally on Ubuntu 16.04
sudo apt install ruby ruby-dev
sudo gem install travis
# install path: /var/lib/gems/
@AlphaWong
AlphaWong / Travis CI local install
Created November 16, 2019 09:46 — forked from jarun/Travis CI local install
How to install Travis CI locally on Ubuntu 16.04
sudo apt install ruby ruby-dev
sudo gem install travis
# install path: /var/lib/gems/
@AlphaWong
AlphaWong / gist:f381f3e554c579dd44e7be8505741b20
Created August 20, 2019 04:11
ava config support import
```json
"ava": {
"require": "esm",
"babel": {
"extensions": [
"js",
"mjs"
],
"testOptions": {
"presets": [
[get] /api/signages?stationCode=mkk&type=poster

{
  MKK: {
    "A1":[
      {
        "name": {
          "zh-hk": "中銀",
 "en": "BOC",
@AlphaWong
AlphaWong / docker-cleanup-resources.md
Created December 21, 2018 02:19 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@AlphaWong
AlphaWong / howto.md
Created October 1, 2018 16:13 — forked from petrkohut/howto.md
How to have redis-cli and psql installed on machine using Docker

How to install redis-cli and psql client on your machine with Docker

Preparing docker images

We will use minimalistic Linux distribution called Alpine (5MB)

Dockerfile of redis-cli

FROM alpine:latest
RUN apk --update add redis