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 / README.md
Created March 1, 2026 07:58 — forked from paolocarrasco/README.md
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to perform a git commit and suddenly you see this error message after it 😰

error: gpg failed to sign the data
fatal: failed to write commit object

Understand the error (important to solve it later!)

@ypwu1
ypwu1 / medium.user.js
Created February 22, 2026 01:23 — forked from allenyllee/medium.user.js
Bypass Medium Paywall - Working at Jan 2026 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass (Manual Button + Badge + Fallback + Offline)
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 3.5
// @inject-into content
@ypwu1
ypwu1 / makefile
Created December 6, 2024 13:35 — forked from serinth/makefile
Golang Makefile
# Basic Makefile for Golang project
# Includes GRPC Gateway, Protocol Buffers
SERVICE ?= $(shell basename `go list`)
VERSION ?= $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || cat $(PWD)/.version 2> /dev/null || echo v0)
PACKAGE ?= $(shell go list)
PACKAGES ?= $(shell go list ./...)
FILES ?= $(shell find . -type f -name '*.go' -not -path "./vendor/*")
# Binaries
PROTOC ?= protoc
@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 (