Skip to content

Instantly share code, notes, and snippets.

View ypwu1's full-sized avatar
Powered by ⚰️

Oscar ypwu1

Powered by ⚰️
  • Melbourne
View GitHub Profile
@ypwu1
ypwu1 / .ideavimrc
Created November 21, 2021 05:59 — forked from dewaka/.ideavimrc
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" Copy to system clipboard as well
set clipboard+=unnamed
@ypwu1
ypwu1 / brew-perms.sh
Created November 20, 2021 19:50 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@ypwu1
ypwu1 / multiple_ssh_setting.md
Created November 3, 2021 21:54 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@ypwu1
ypwu1 / virtualbox-minikube-ipv6.sh
Created July 18, 2021 05:06 — forked from santouras/virtualbox-minikube-ipv6.sh
Fix virtualbox/minikube ipv6 issue
#!/usr/bin/env bash
vm='minikube'
natnet='vboxipv6'
echo 'Fixing virtualbox/minikube IPV6 problems'
if ! command -v vboxmanage &> /dev/null; then
echo 'vboxmanage is not installed'
exit 1
@ypwu1
ypwu1 / HPFFP.md
Created September 19, 2020 12:05 — forked from DadgadCafe/HPFFP.md
Haskell Programming From First Principles

HASKELL PROGRAMMING FROM FIRST PRINCIPLES

CHAPTER1. ALL YOU NEED IS LAMBDA

1.1 All You Need is Lambda

lambda calculus:

computation model, 1930s, Alonzo Church, formalizing a method, Turing machines

@ypwu1
ypwu1 / main.c
Created July 18, 2020 08:09 — forked from josephg/main.c
kqueue network & file example
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/event.h>
#include <netdb.h>
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
@ypwu1
ypwu1 / epoll.go
Created July 18, 2020 02:41 — forked from tevino/epoll.go
An example of using epoll in Go
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (
@ypwu1
ypwu1 / README.md
Created July 7, 2020 22:49 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack
@ypwu1
ypwu1 / main.go
Created February 28, 2020 21:05 — forked from vdparikh/main.go
GoLang Verify/Generate JWT Token
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
"time"
@ypwu1
ypwu1 / README.txt
Created September 19, 2019 06:12 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go