Skip to content

Instantly share code, notes, and snippets.

View midnight-wonderer's full-sized avatar

Sarun Rattanasiri midnight-wonderer

View GitHub Profile
@midnight-wonderer
midnight-wonderer / nat-instance.Makefile
Last active August 24, 2019 11:35
Creating Linux NAT router
SHELL:=/usr/bin/env bash
DEFAULT_INTERFACE=$(shell /sbin/route | grep default | grep -Eo "[a-z0-9]+$$")
VPC_CIDR=10.0.0.0/16
forward-traffic:
/sbin/iptables -t nat -A POSTROUTING -o $(DEFAULT_INTERFACE) -s $(VPC_CIDR) -j MASQUERADE
@midnight-wonderer
midnight-wonderer / Makefile
Last active December 3, 2018 04:11
My SDCC Makefile
SHELL=/usr/bin/env bash
SDCC=sdcc
SDCCLIB=sdcclib
SRCDIR=./src
BINDIR=./bin
INCLUDES=\
./vendor/stm8s/inc\
./vendor/button_debounce/inc
CFLAGS=--std-c11 --nolospre $(addprefix -I,$(INCLUDES))
LDFLAGS=--out-fmt-ihx
0x6D1AA09da52F0DbA45d4eA3Ab5AD96b1C40577C9
# Usage:
# ========
# FirebaseAuth::Auth.verify_id_token(your_id_token)
#
# The method call follows the same API of the Node.js, JAVA and Python SDKs.
# See https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_the_firebase_admin_sdk
# Dependencies:
# ---------------
# gem 'activesupport'
@midnight-wonderer
midnight-wonderer / .bash_completion.sh
Last active June 27, 2024 18:39
user's applications
# for applications
for bcdir in $(find $HOME/.local/applications -mindepth 2 -maxdepth 2 -type d -name bash-completion.d -print) ; do
for bcfile in $(find "$bcdir" -mindepth 1 -maxdepth 1 -type f -print) ; do
. $bcfile
done
done