Skip to content

Instantly share code, notes, and snippets.

# You'll need to pip install web3 for this, everything else should come as standard
# Works as 'python snipertech.py {target-casesensitive} {sharesToBuy-1_to_9} {maximum_total_amount_in_ETH}
# e.g. python snipertech.py functi0nZer0 1 0.4
# Loops in ten second increments to try and buy your shares if they don't exist on FriendTech yet, then crashes out
# Adjust loop length on line 86 if you want to be less frequent - if they already exist, it just buys and dies.
import requests
@yorickdowne
yorickdowne / HallOfBlame.md
Last active June 19, 2024 18:17
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.

#! /bin/bash
# -------- Config --------
# WALLET_NAME should be the name of the wallet (chain-maind keys list)
WALLET_NAME="Default"
# If WALLET_ADDRESS is blank, it will try to pull your address. (chain-maind keys show ${WALLET_NAME} --address)
# This is my address, so replace it with your own. Feel free to send me a murder of CROs.
# NOTE: All transactions with my address will fail since you don't have my keys, of course.
WALLET_ADDRESS="cro1ghlngrfrvjjf7r2h6ffpwaqcs630qxm509p2el"
# VALIDATOR_IGNORE_REGEX is a Regular Expression that will ignore specific validators for re-delegating but
@apetresc
apetresc / redelegate-cro.sh
Last active March 28, 2023 05:44
A script to automatically claim Crypto.org CRO staking rewards and re-stake them
#!/bin/bash -e
# redelegate-cro.sh is a script that automatically claims all your delegation
# rewards (across any number of validators) in a single transaction (assuming a
# minimum reward threshold is met, to avoid spurious transactions). The rewards
# are then automatically redelegated to the provided validator address, leaving
# behind at least a 0.005 CRO buffer to ensure there is always enough for
# regular transaction fees.
#
# The idea is that it is safe to run this script on a fixed cron schedule and
@rowanwins
rowanwins / gist:97188a36a10ea3143b13
Created March 22, 2016 22:09
Layer toggle with layer group
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Demo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet' type='text/css'>
<style>
@rowanwins
rowanwins / gist:fae3bd7e6f9831e27b72
Created February 3, 2016 23:26
Tile server load testing results
//NODE, MBTILES AND EXPRESS TILE SERVER WITH 200 CONCURRENT REQUESTS FOR 20seconds
Target URL: http://localhost:7777/scene/tiles/15/29987/19801.png
Completed requests: 7568
Total errors: 0
Total time: 20.001499538 s
Requests per second: 378
Total time: 20.001499538 s
Percentage of the requests served within a certain time
50% 518 ms
90% 556 ms
@rowanwins
rowanwins / gist:60d8bac05a28c2874909
Created September 2, 2015 23:32
NVDI Raster Calculator
(Float("NIR.TIF") - Float("RED.TIF")) / (Float("NIR.TIF") + Float("RED.TIF"))
@rowanwins
rowanwins / gist:6e257c20138360a9f622
Created August 20, 2015 05:48
Visible atmospherically resistant index for Raster Calculator
("Green" - "Red")/("Green" + "Red" - "Blue")
@rowanwins
rowanwins / gist:120bf64470c89cd191a2
Created June 10, 2015 10:37
Use ogr2ogr to import shp to MySQL
ogr2ogr -f "MySQL" MYSQL:"dbName,host=localhost,user=root,port=3306" -nln "tableName" -a_srs "EPSG:4326" shpName.shp -lco ENGINE=MyISAM
@rowanwins
rowanwins / gist:b1991a57cd59ec6a265c
Created May 28, 2015 22:50
Adding transition to polygon fill in leaflet
.leaflet-container path{
transition: fill .75s;
}