Skip to content

Instantly share code, notes, and snippets.

@klingerf
klingerf / books.md
Last active March 12, 2020 06:11
Buoyant Book Club Reading List

Already Read

Title Author Published Pages
The Linux Command Line: A Complete Introduction William E. Shotts Jr. 2012 480
A Philosophy of Software Design John Ousterhout 2018 190
The Soul of A New Machine Tracy Kidder 1981 320
Thinking in Systems: A Primer Donella H. Meadows 2008 240

Past/Future Candidates

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@dvdbng
dvdbng / vim-heroku.sh
Last active October 16, 2024 17:15
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@jugyo
jugyo / get_tlds.rb
Created March 10, 2014 07:17
Script to get TLDs from iana.org
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open('http://www.iana.org/domains/root/db'))
tlds = []
doc.css('table#tld-table tr').each do |tr|
info = tr.css('td')
next if info.empty?
tlds << {
@jakl
jakl / README.md
Last active December 28, 2015 11:19
Google doc jsonp test

Gdoc Jsonp

Google doc spreadsheets can be used as client-side-only data endpoints with the jsonp protocol

Here is a simple demo of my document that contains

name    	 age
--------------
@jakl
jakl / README.md
Last active December 23, 2015 00:49
Git Branch with Smart Directories

git-bd setup

mkdir workspace
cd workspace
git clone https://github.com/nnutter/git-bd.git
cd
mkdir bin
cd bin
@domenic
domenic / promises.md
Last active November 4, 2025 20:27
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@ryangreenberg
ryangreenberg / todo.rb
Created March 26, 2012 23:03
todo_for_real
require 'date'
class ExpiredTodoError < StandardError; end
# Implementation #
def todo(what, by_date)
if production? || (Date.parse(by_date) >= Date.today)
yield
else
raise ExpiredTodoError, "TODO: #{what}"
package preloadagent;
/**
Copyright 2010 Sam Pullara
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@tmm1
tmm1 / em-strace-filter.rb
Created March 1, 2009 05:28
filter strace logs for an epoll em reactor to find latency
#!/usr/bin/env ruby
#
# Use to filter strace output associated with ruby/EM processes running with EM.epoll
# sudo strace -ttTp <ruby process pid> -o ruby.strace
# cat ruby.strace | ./em-strace-filter.rb > filtered.strace
#
require 'time'
begin_time = nil
end_time = nil