Skip to content

Instantly share code, notes, and snippets.

View speedmax's full-sized avatar

Taylor luk speedmax

View GitHub Profile
@speedmax
speedmax / HallOfBlame.md
Created November 6, 2025 08:30 — forked from yorickdowne/HallOfBlame.md
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

@speedmax
speedmax / min.css
Last active November 24, 2016 04:17
div.issue-preview-widget .issue-info{padding-right:5px}div.issue-preview-widget .issue-article-category{color:#012b65;text-transform:uppercase;display:block;font-size:10px;font-weight:700}div.issue-preview-widget .issue-article-title{margin-top:10px;font-family:"Playfair Display";text-transform:capitalize;letter-spacing:0;font-weight:400;font-style:normal;color:#000;opacity:1;visibility:visible;margin-top:0;margin-bottom:10px;font-size:16px}div.issue-preview-widget .issue-title{position:relative;font-size:1.563em;font-family:"Playfair Display";text-transform:capitalize;letter-spacing:0;font-weight:400;font-style:normal;color:#000;opacity:1;visibility:visible}.issue-preview-widget .issue-article-list:before{font-size:12px;font-family:"Open Sans";color:#1e73be;display:inline;padding:0 4px;margin-bottom:4px;text-transform:uppercase;font-weight:700!important;letter-spacing:-1px}div.issue-preview-widget a.button{font-family:"Playfair Display";text-transform:uppercase;background-color:#012b65;color:#FFF;border:0 so
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@speedmax
speedmax / ssl_requirement_spec.rb
Created July 9, 2013 06:22
How to test rack middleware
require 'spec_helper'
# Based on https://github.com/rails/ssl_requirement/blob/master/lib/ssl_requirement.rb
class SslRequirement
def initialize(app, options= {})
@app = app
@allowed = options[:allowed]
@required = options[:required]
end
<script>oddsense_account = "your account name in lowercase"</script>
<script type="text/javascript" src="//api.oddsense.com/oddsense.js"></script>
</body>
class ActiveRecord::Base
class << self
def select_values(*args)
options = args.extract_options!
validate_find_options(options)
set_readonly_option!(options)
raise "select_values does not support the :include option" if options[:include]
class ActiveRecord::Base
def self.find_values opts
sql = self.send(:construct_finder_sql, opts)
self.connection.select_values(sql)
end
end
>> Tagging.find_values(:select => :taggable_id, :limit => 30, :order => 'tagged_at asc')
=> ["1", "3", "6", "6", "6", "10", "10", "10", "11", "11", "11", "10", "10", "10", "10", "10", "13", "13", "13", "13", "13", "13", "15", "15", "15", "15", "15", "15", "15", "15"]
@speedmax
speedmax / mongo_active_model_compat.rb
Created March 25, 2010 12:53
MongoMapper ActiveModel serialization compatible
module ActiveModel::Compatible
extend ActiveSupport::Concern
extend ActiveModel::Naming
include ActiveModel::Serializers::Xml
include ActiveModel::Serializers::JSON
def to_xml(options = {}, &block)
options[:except] ||= []
options[:except] << :_id
namespace :db do
namespace :migrate do
desc 'Use the migrations to create the test database'
task :all => ['db:migrate', 'db:test:clone]
end
end
@speedmax
speedmax / _README.md
Created November 23, 2009 02:21 — forked from kneath/_README.md

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js