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 May 14, 2024 14:59
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 September 21, 2024 11:12
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on latency and IOPS, I/O Per Second, of the storage. Budget SSDs will struggle to an extent, and some won't be able to sync at all. For simplicity, this page treats IOPS as a proxy for/predictor of latency.

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

The drive lists are ordered by interface and then by capacity and alphabetically by vendor name, not by preference. The lists are not exhaustive at all. @mwpastore linked a filterable spreadsheet in comments that has a far greater variety of drives and their characteristics. Filter it by DRAM yes, NAND Type TLC, Form Factor M.2, and desired capacity.

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. The Portal team aim to make 2TB [last forever with EIP-4444](https://

@crazygit
crazygit / parseTransaction.go
Last active September 7, 2024 22:42
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 August 9, 2024 14:49
国内拉取google kubernetes镜像
@slok
slok / pprof.md
Last active August 11, 2024 13:38
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@ozbillwang
ozbillwang / Git_Behind_Proxy.md
Last active July 23, 2024 12:31
Configure Git to use a proxy (https or SSH+GIT)
@npearce
npearce / install-docker.md
Last active September 5, 2024 17:58
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'):