Skip to content

Instantly share code, notes, and snippets.

View obbaeiei's full-sized avatar

Theerawit Akesiripong obbaeiei

View GitHub Profile
@obbaeiei
obbaeiei / command line
Last active October 9, 2023 07:26
Easy Works docker compose create mongo's replica localhost - use with setup.sh
docker compose up -d
// This is universal, works with Infura -- set provider accordingly
const ethers = require('ethers')
//const provider = ethers.getDefaultProvider('rinkeby')
const provider = new ethers.providers.JsonRpcProvider(process.env.WEB3_URL)
function hex_to_ascii(str1) {
var hex = str1.toString();
var str = '';
for (var n = 0; n < hex.length; n += 2) {
@obbaeiei
obbaeiei / cloudSettings
Last active May 22, 2021 11:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-05-22T11:43:54.326Z","extensionVersion":"v3.4.3"}
@pallat
pallat / runq.go
Last active October 24, 2017 03:33
example queue usage
package main
import (
"fmt"
"github.com/pallat/queue"
)
type lot struct {
items []int
@hakanensari
hakanensari / gist:2029402
Created March 13, 2012 15:25
Remove all tags in a repo
# Local
git tag -l | xargs git tag -d
# Remote
git ls-remote --tags origin | awk '/^(.*)(\s+)(.*[a-z0-9])$/ {print ":" $2}' | xargs git push origin