Skip to content

Instantly share code, notes, and snippets.

@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:6e257c20138360a9f622
Created August 20, 2015 05:48
Visible atmospherically resistant index for Raster Calculator
("Green" - "Red")/("Green" + "Red" - "Blue")
@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: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: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>
@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
#! /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
@yorickdowne
yorickdowne / HallOfBlame.md
Last active January 16, 2026 05:25
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. IOPS can roughly be used as proxy of / predictor for latency. Measuring latency directly is arguably better.

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 is a conservative choice which also supports a Fusaka "supernode". The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with [pre-merge history expiry](http

# 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
@burkeholland
burkeholland / 4.1.chatmode.md
Last active December 15, 2025 22:19
4.1 Beast Mode v2
description tools
4.1 Beast Mode
changes
codebase
editFiles
extensions
fetch
findTestFiles
githubRepo
new
openSimpleBrowser
problems
readCellOutput
runCommands
runNotebooks
runTasks
runTests
search
searchResults
terminalLastCommand
terminalSelection
testFailure
updateUserPreferences
usages
vscodeAPI

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.