Skip to content

Instantly share code, notes, and snippets.

View zed-wong's full-sized avatar
👨‍🍳
Cooking

Zed Wong zed-wong

👨‍🍳
Cooking
View GitHub Profile
@zed-wong
zed-wong / authorize.js
Last active July 27, 2022 02:15
Mixin SPA OAuth helper
// https://github.com/fox-one/uikit/blob/main/packages/uikit/src/utils/authorize.ts
// https://github.com/fox-one/uikit/blob/main/packages/uikit/src/services/mixin/oauth.js
import ReconnectingWebSocket from "reconnecting-websocket";
import { gzip } from "pako/lib/deflate";
import { ungzip } from "pako/lib/inflate";
import { v4 as uuidv4 } from "uuid";
import sha256 from "crypto-js/sha256"
import EncBase64 from "crypto-js/enc-base64";
@zed-wong
zed-wong / git-remove-from-history.sh
Created June 12, 2022 06:23
Remove file from git history
git filter-branch --index-filter \
'git rm -rf --cached --ignore-unmatch path_to_file' HEAD
@zed-wong
zed-wong / Leafer_twilio_outbound.xml
Last active April 27, 2022 12:28
Leafer alert from twilio
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play loop="2">https://drive.google.com/uc?id=110Z0bLzKmYWASkCkpKb7g60x5TscOPtC</Play>
</Response>
@zed-wong
zed-wong / ff.go
Created August 8, 2021 00:26
golang ffmpeg exec
package main
import(
"fmt"
"log"
"os/exec"
"strings"
)
func main(){