Skip to content

Instantly share code, notes, and snippets.

@sophoah
sophoah / jq.md
Last active June 11, 2021 08:49
linux cheat sheet
@sophoah
sophoah / diskoperation.md
Last active July 22, 2021 12:00
linux command operation and help

Extend a parition without restart on ubuntu

assumption

you need to have some space free before doing the below if not command will fail

you need the ubuntu tool growpart / resize2fs / xfs_growfs apt install cloud-guest-utils xfsprogs -y

check and confirm which type (ext4 or xfs) is your partition

df -Th
@sophoah
sophoah / netcat.md
Last active January 31, 2021 13:45
Networking linux cheat sheet

open TCP port for listening

nc -lv 80

add u for UDP

@sophoah
sophoah / deploy.yml
Last active December 16, 2020 07:54
harmony / akash
---
version: "2.0"
services:
harmony:
image: harmonyone/node
env:
- TEST=test
expose:
- port: 9500
@sophoah
sophoah / monitor-zerolog.py
Created November 15, 2020 13:35
harmony one zerolog monitor
from pygtail import Pygtail
from utils import *
import time
import re
import json
import sys
import os
import argparse
import requests
@sophoah
sophoah / pva-node-checker.py
Last active August 29, 2020 02:43
PVA node checker
#!/usr/bin/env python
# coding: utf-8
import json
import requests
from requests.exceptions import HTTPError
import re
import argparse
def get_information_rpc(rpc_endpoint, method, params):
@sophoah
sophoah / procedure.md
Last active March 6, 2020 16:22
OSTN double-signing test procedure

OSTN Double-Signing Procedure

Installation

Prerequisites: If you don't have curl or jq installed - install them first (e.g. sudo apt-get install curl jq on Linux)

Download the custom static double-signing binary, node.sh and hmy:

bash <(curl -sSL https://raw.githubusercontent.com/SebastianJ/harmony-tools/master/install/install.sh) --node --enable-double-signing
@sophoah
sophoah / tip-and-tricks.md
Created February 12, 2020 06:59
Tip and Tricks

Ctrl+Alt+Del in RDP

  • Ctrl+Alt+End
  • start and type osk or On screen keyboard, then press Ctrl+Alt+Del
@sophoah
sophoah / CS-git.md
Last active June 1, 2023 02:58
Cheat Sheet series - git

Git cheat Sheet

working with branches

1 - create new branch

git checkout -b new_branch_name

2 - push (new) branch to remote repo (when the branch doesn't exist at the origin repo)

@sophoah
sophoah / definition.md
Last active January 30, 2020 12:33
Blockchain terms

Soph's blockchain glossary

Atomic locking

atomic locking is a technique to ensure the cross-shard transaction are consistent between shards. It’s mainly used for the case where you need to send token from 2 shards at the same time. It works as first the tokens from the two shards get locked, and then those token will be spent together on the destination shard, and finally the token from the two originating shards gets unlocked and deducted.

keystore file

A keystore file (sometimes called a UTC file) is an encrypted version of your private key. They are generated using your private key and a password that you use to encrypt it. If you open up your keystore file in a text editor it contains data pertaining to the encryption of the private key. more information are available here : https://medium.com/@julien.maffre/what-is-an-ethereum-keystore-file-86c8c5917b97