Skip to content

Instantly share code, notes, and snippets.

View joeangel's full-sized avatar
📚
Working on Crypto

JoeAngel.tw joeangel

📚
Working on Crypto
View GitHub Profile
@potter0815
potter0815 / cloneall.sh
Last active January 30, 2024 13:07
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"
@mrkpatchaa
mrkpatchaa / README.md
Last active October 22, 2025 07:06
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

@nolanlawson
nolanlawson / why_we_dropped_lerna_from_pouchdb.md
Last active December 13, 2023 10:56
Why we dropped Lerna from PouchDB

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).

Backstory:

【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約

Infura Logo From Consensys

Infura 提供公開的 Ethereum 主網和測試網路節點。到 Infura 官網申請,只要輸入一點基本資料和 Email,就可以收到 API-key。

Infura API Key


@mrmu
mrmu / gist:ab87723d54f720a6d603eeafa9660522
Last active April 28, 2023 09:06
使用 woocommerce 內建的 wc logger,將 debug 用的 log 記錄到後台 WooCommerce / 狀態 / 記錄 裡。
<?php
/*
* arg:
* $msg: 要紀錄的內容,可用 string/array
* $source_name: 此 log 的別名,方便於後台辨識
*/
function my_wc_log($msg, $source_name) {
if (function_exists('wc_get_logger')) {
$log = wc_get_logger();
#!/bin/bash
dbs="admin dbname1 dbname2"
user=admin
password=your-password
host=localhost:27017
i=0
for db in $dbs; do
echo [MongoDB] backup db: $db
mongodump -u ${user} -p ${password} --host ${host} --db ${db}
@andelf
andelf / trc20.py
Created February 28, 2020 18:14
Get TRC20 balance and Transfer TRC20 tokens
import requests
import base58
import base64
from pprint import pprint
ADDRESS = "T....your address"
PRIV_KEY = 'hex private key'
CONTRACT = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" # USDT
[color]
ui = auto
[push]
default = simple
[alias]
lg = log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
lgf = log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --name-status
lgp = log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --word-diff -p
st = status
a = add
key en ja zh-HK zh-TW
FELICA_PASS_PROPERTIES_TICKET_SEAT_FORMAT %1$@-%2$@ %1$@-%2$@ %1$@-%2$@ %1$@-%2$@
PASS_VIEW_USER_ACTIVITY_TEMPLATE_NAME_NON_PAYMENT_TICKET ticket チケット 門票 門票
PROGRESS_ACTIVATING Card Activating… カードをアクティベート中… 正在啟用卡⋯ 正在啟用卡片⋯
PASS_MULTIPLE_CHANGES_BULLETIN_PASS Pass changed パスが変更されました 票證已更改 票卡已更改
PROGRESS_DOWNLOADING_CARD_IPAD Adding to Apple Pay… Apple Payに追加中… 正在加至Apple Pay⋯ 正在加入Apple Pay⋯
PROGRESS_CONTACTING_ISSUER Contacting the Card Issuer… カード発行元に問い合わせ中… 正在聯絡發卡機構⋯ 正在聯絡發卡機構⋯
PASS_VIEW_USER_ACTIVITY_TEMPLATE_NAME_NON_PAYMENT_BOARDING_PASS boarding pass 搭乗券 登機證 登機證
PASS_VIEW_USER_ACTIVITY_TEMPLATE_NAME_NON_PAYMENT_PASS pass パス 票證 票卡
@santaklouse
santaklouse / CrossOver.sh
Last active November 12, 2025 07:54
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS