Skip to content

Instantly share code, notes, and snippets.

View lostsnow's full-sized avatar
👻
nil

lostsnow lostsnow

👻
nil
View GitHub Profile
@holgerd77
holgerd77 / ethereumjs-evm-bundle.js
Created September 20, 2024 08:27
Unminifed JS bundle of the EthereumJS EVM with all dependencies
const FORMAT = 239;
const MAGIC = 0;
const VERSION = 1;
const MAX_HEADER_SIZE = 49152;
const KIND_TYPE = 1;
const KIND_CODE = 2;
const KIND_CONTAINER = 3;
const KIND_DATA = 4;
const TERMINATOR = 0;
const TYPE_MIN = 4;
@gus4rs
gus4rs / gist:18e00a1249778b8bbbb71c3efe586ff1
Last active July 11, 2024 15:58
Create a validator on Holesky without the Launchpad

⚠️ Do not do this for mainnet, this is a quick and insecure procedure that it's fine for Testnet only

  1. Download and install https://github.com/wealdtech/ethdo and https://github.com/ethereum/staking-deposit-cli
  2. Connect your Metamask to Holesky and generate a new address
  3. Use the address to get some 33 HolETH from https://holesky-faucet.pk910.de/
  4. Generate a new keystore for your validator using the staking-deposit-cli tool. Replace 0xADDR by your metamask address
./deposit.sh new-mnemonic --chain holesky --execution_address 0xADDR --num_validators 1
@kuzemkon
kuzemkon / main.tf
Last active June 18, 2024 09:47
AWS ECS events CloudWatch metrics gathering Terraform
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
provider "aws" {

开发流程与过程规范

主要涉及三个方面:

  1. Git 分支流程与提交历史
  2. GitHub 协作流程

1. Git 分支流程与提交历史

对 Git 不熟悉的开发者可以先阅读官方教材《Pro Git》

@icexin
icexin / httpctx.go
Last active December 31, 2023 11:53
package main
import (
"context"
"fmt"
"net/http"
"net/url"
)
type contextKey int
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
import pylab
import bs4
def get_mcd_content():
path = 'C:/Users/aneasystone/Desktop/11.mcd'
mcd = ''
with open(path, 'rb') as file:
mcd = file.read()
return str(mcd)
@jhoff
jhoff / README.md
Last active April 1, 2024 07:45
Bash-only Laravel Artisan tab auto-complete

If you are an Oh-my-zsh user, see the Laravel 5 plugin

For the rest of us Bash users, all of the Laravel Artisan autocomplete solutions out there require installing a composer package to get a list of artisan commands. Turns out this isn't really necessary. Simply add the provided code in ~/.bash_profile ( or similarly sourced file ) and you'll get artisan command tab completes on any project on your system.

_artisan()
{
	COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
	COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
	COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 17, 2024 04:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@janlay
janlay / README.md
Last active August 28, 2024 09:44
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.