Skip to content

Instantly share code, notes, and snippets.

View tzaffi's full-sized avatar
🐙
Octopii are cool

Zeph Grunschlag tzaffi

🐙
Octopii are cool
View GitHub Profile
@ryanberckmans
ryanberckmans / miner-yesterday-mev-revenue.sh
Created June 6, 2021 16:57
Yesterday's total miner revenue from flashbots mev
# Here's a bash 1-liner to calculate how much flashbots MEV revenue was earned by miners yesterday.
# It uses the flashbots API, coingecko API, and requires curl, awk, jq, and ruby.
# Data is only available for the last 24 hours or most recent 10,000 blocks, per flashbots API limits.
# See blocks.flashbots.net.
#
# Example output:
#
# Yesterday's total miner MEV revenue
# -----------------------------------
# 486.25 ETH
@mjpieters
mjpieters / # Sourcemap processing in Python.md
Last active December 15, 2023 11:32
Python sourcemap parsing

Sourcemap processing in Python

This gist contains two Python modules:

  • sourcemap: a module to parse and generate JavaScript source maps
  • base64vlq: code to decode and encode base64 VLQ sequences, an encoding used in source maps.

License

The code is licensed under the terms of the MIT license, included in the gist.

@tzaffi
tzaffi / SES-SNS-Gmail2Sheet.js
Last active April 6, 2016 18:26
Add this to your sheet scripts to enable parsing through your SNS SES notifications and create a useful sheet for analyzing recipients, including bad ones.
/************
* Inspired by:
* https://ctrlq.org/code/20053-save-gmail-to-google-spreadsheet
* https://gist.github.com/oshliaer/70e04a67f1f5fd96a708
*************/
var IS_DEBUG = false;
var RUN_SIZE = 10; //this variable is ignored unless IS_DEBUG true
// Cf. https://developers.google.com/apps-script/reference/gmail/gmail-message#methods
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@ChrisWills
ChrisWills / .screenrc-main-example
Created November 3, 2011 17:50
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'