Skip to content

Instantly share code, notes, and snippets.

View imom0's full-sized avatar
💭
I may be slow to respond.

iMom0 imom0

💭
I may be slow to respond.
View GitHub Profile
@weijarz
weijarz / twitter-mute-all-ad-accounts.js
Last active April 12, 2024 21:19
Twitter mute all ad accounts
// ==UserScript==
// @name Twitter: Mute all ads
// @namespace Violentmonkey Scripts
// @match https://twitter.com/*
// @grant none
// @version 1.0
// @author @weijarz
// @description 7/5/2023, 9:31:41 PM
// ==/UserScript==
@yorickdowne
yorickdowne / HallOfBlame.md
Last active May 5, 2024 11:42
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.

This document aims to snapshot some known good and known bad models.

For size, 4TB comes recommended as of mid 2024. The smaller 2TB drive should last an Ethereum full node until early 2025 or thereabouts, with crystal ball uncertainty. Remy wrote a migration guide to 4TB.

High-level, QLC and DRAMless are far slower than "mainstream" SSDs. QLC has lower endurance as well. Any savings will be gone when the drive fails early and needs to be replaced.

@crazygit
crazygit / parseTransaction.go
Last active April 25, 2024 00:49
Parse Ethereum Transaction, Decode input data, Decode output data
package main
import (
"context"
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
@Xavier59
Xavier59 / privatekeysolana.js
Created December 28, 2021 14:49
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key
@miguelmota
miguelmota / multicall.go
Created June 12, 2021 01:10
Golang MultiCall solidity contract call example
package main
import (
"context"
"encoding/hex"
"fmt"
"strings"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
@qwfys
qwfys / 202005281327.md
Last active May 1, 2024 04:24
国内拉取google kubernetes镜像
@slok
slok / pprof.md
Last active May 4, 2024 11:28
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@ozbillwang
ozbillwang / Git_Behind_Proxy.md
Last active April 20, 2024 15:58
Configure Git to use a proxy (https or SSH+GIT)
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
#!/usr/bin/env python3
from __future__ import print_function
import frida
import sys
import json
import time
def on_message(message, payload):
if(message['type'] == 'send'):