Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Focusing

Ha Link halink0803

🐢
Focusing
View GitHub Profile
View sample tradelogs.json
[
{
"timestamp": 1618410797000,
"block_number": 6560905,
"tx_hash": "0x74d75409850edbcde10de7a36ba4fa71e5b796065cf670d0302883b8005f3433",
"token_info": {
"src_addr": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"src_symbol": "BNB",
"dst_addr": "0x55d398326f99059ff775485246999027b3197955",
"dst_symbol": "USDT"
View ssh debug.txt
ssh -vv staging_lob_monitoring_producer
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/halink/.ssh/config
debug1: /home/halink/.ssh/config line 60: Applying options for staging_lob_monitoring_producer
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "3.0.248.65" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 3.0.248.65 [3.0.248.65] port 22.
debug1: Connection established.
View main.go
package main
import (
"context"
"fmt"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
)
View postgres procedure function.md
	CREATE OR REPLACE FUNCTION get_erc20_transfer(text, text, integer, integer) RETURNS text AS 
$$
DECLARE
query_final text;
wallet ALIAS FOR $1;
token ALIAS FOR $2;
from_time ALIAS FOR $3;
to_time ALIAS FOR $4;
BEGIN
@halink0803
halink0803 / fix_onedrive.sh
Created Nov 1, 2018 — forked from drblue/fix_onedrive.sh
Fix OneDrive for Mac CPU usage
View fix_onedrive.sh
#!/bin/bash
find ~/Library/Group\ Containers/ -type d -name OfficeFileCache -exec rm -r {} +
View wallet_fees_cq.sql
CREATE CONTINUOUS QUERY "wallet_fee" ON "trade_logs"
RESAMPLE EVERY 1h FOR 1d
BEGIN
SELECT SUM("amount") as "sum_amount"
INTO "hourly_wallet_fees"
FROM "wallet_fees"
GROUP BY "reserve_addr", "wallet_addr", time(1h)
END
CREATE CONTINUOUS QUERY "wallet_fee_1d" ON "trade_logs"
@halink0803
halink0803 / Clear Chrome synced data.md
Last active Oct 15, 2018
Clear Chrome synced data
View Clear Chrome synced data.md

From device

  1. Go to chrome://settings/people.
  2. Click turn off sync data.
  3. At the pop up, check into Clear bookmark, history, password and more from this device.
  4. Click turn off.

=> all your synced data will be cleared from the device.

From cloud

View Get bolt buckets name list.md
err = db.View(func(tx *bolt.Tx) error {
        return tx.ForEach(func(name []byte, _ *bolt.Bucket) error {
            fmt.Println(string(name))
            return nil
        })
    })
View Twelve_Go_Best_Practices.md
@halink0803
halink0803 / docker-cleanup-resources.md
Last active Jan 16, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm