Skip to content

Instantly share code, notes, and snippets.

View mw866's full-sized avatar
🇸🇬

Chris Wang mw866

🇸🇬
View GitHub Profile
@mw866
mw866 / splunk.md
Last active September 15, 2017 12:52
Splunk Configuration for Log over REST API
@mw866
mw866 / gist:edb0d90a0979b115189215318126de1d
Created November 13, 2017 00:25
Blockstack ID Verification
Verifying my Blockstack ID is secured with the address 1Hr5ufE7L37SGaT6T1YGrz8WjTdBY7kbbV https://explorer.blockstack.org/address/1Hr5ufE7L37SGaT6T1YGrz8WjTdBY7kbbV
@mw866
mw866 / exiftoo.md
Last active September 29, 2018 14:26
exiftools: modify EXIF metadata from .mp4 converted from insv

Usages

View exif data: exiftool VID_20180721_165329_004.mp4 Update EXIF dates based on file names

exiftool '-alldates<${filename}+08:00' 
@mw866
mw866 / doh.sh
Last active December 27, 2021 06:49
#doh #dns
# The DNS-over-HTTPS wrapper over curl. It supports JSON format instead of wire format (RFC 8484)
# For best results, add it to your shell startup config files .e.g. .zshrc, .bashrc, or .bash_profile
# Some usage examples:
# doh www.example.com
# doh www.example.com AAAA
# doh www.example.com AAAA https://cloudflare-dns.com/dns-query
doh() {
if [ "$1" = "" ]|| [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
@mw866
mw866 / decrypt.sh
Last active December 27, 2021 05:50
decrypt #pdf
# Decrypt all pdf files in the current folder (./) and replace the encrypted files with the decrypted ones
# Prerequisites:
# a. password.txt to be placed in the current folder.
# b. qpdf to be installed.
# Paste it to your ~/.zshrc file.
decrypt(){
if [[ -z $1 ]]
then
DIR="$(pwd)"
else
@mw866
mw866 / npm.sh
Last active December 27, 2021 06:09
#node
#[update \| npm Documentation](https://docs.npmjs.com/cli/update)
# npm: List all global npm packages
npm ls -g --depth 0
# List oudated packages
npm outdated
npm -g install
npm -g update
@mw866
mw866 / go.sh
Last active December 27, 2021 06:07
#golang
##
go install github.com/cloudflare/cfssl/cmd/cfssljson@latest
@mw866
mw866 / venv.sh
Last active May 27, 2024 07:57
#python
# https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments
# Install
python3 -m venv .venv
# Activate
source .venv/bin/activate
# Deactivate
deactivate
@mw866
mw866 / rust.sh
Created December 27, 2021 05:53
#rust
# Foce install a crate
cargo install wrangler --force
# Update rustlang and cargo
rustup update stable
# - check for newer versions and update all installed packages.
cargo install-update -a
#- check for newer versions and update selected packages, will not install new packages.