Skip to content

Instantly share code, notes, and snippets.

@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 19, 2024 10:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jtbonhomme
jtbonhomme / nc.md
Last active November 7, 2024 18:27
Using Netcat for File Transfers

Netcat is like a swiss army knife for geeks. It can be used for just about anything involving TCP or UDP. One of its most practical uses is to transfer files. Non *nix people usually don't have SSH setup, and it is much faster to transfer stuff with netcat then setup SSH. netcat is just a single executable, and works across all platforms (Windows,Mac OS X, Linux).

Destination

On the receiving (destination) terminal, run:

nc -l -p 1234 > out.file 
@banteg
banteg / get_tokens.py
Last active August 13, 2021 04:07
get all tokens a user has interacted with
from web3 import Web3, HTTPProvider
from eth_utils import encode_hex, event_signature_to_log_topic
from eth_abi import encode_single
w3 = Web3(HTTPProvider('http://127.0.0.1:8545', {'timeout': 120}))
transfer_topic = encode_hex(event_signature_to_log_topic('Transfer(address,address,uint256)'))
def get_tokens(address):
@afmsavage
afmsavage / keep-ecdsa-node.md
Last active September 27, 2020 20:26
Walkthrough to create Keep-ECDSA node for either mainnet or testnet

Keep Network ECDSA Node Setup Guide

9/19/2020
NOTE: I will no longer be updating this guide with the newest testnet bootsrap peers and contract addresses (if they change). You can check the official docs for them at https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#72-testnet. This will only impact the BondedECDSAKeepFactory and SanctionedApplications contract addresses and the bootstrap peers list of the testnet config.toml example below. Last updated when mainnet launched mid Sept.

This guide describes the steps required to get a Keep-ECDSA node up and running on the Ropstein testnet and the Ethereum Mainnet. This guide assumes you are running Ubuntu. If you use a different distro such as Fedora, most commands should remain the same but keep that in mind. Also, please use Novy4's guide to get your server setup and ready to run the ECDSA node. I will be detaili

@blockpane
blockpane / sync.md
Last active February 14, 2022 18:50

State Sync on Osmosis

State sync can greatly speed up the time it takes to bring a node online, and the smaller state size will make processing the epoch much faster. There is however a bug that affects osmosisd v5.0.0-v6.0.1 which causes the replay to fail after syncing

This walks through the steps to bring up a new node using state sync on osmosis v6.0.1, this will likely be outdated pretty quickly (Jan 2, 2022) once the bug is fixed.

Install Osmosis

@davenewham
davenewham / gist:220850ca51667d559bbe9ded6856fd60
Created February 1, 2022 19:32
Convert video file to telegram webm for animated sticker
ffmpeg -i input_file.mp4 -framerate 30 -c:v libvpx-vp9 -an -vf scale=512:512 -pix_fmt yuva420p output_sticker.webm