Skip to content

Instantly share code, notes, and snippets.

View flanger001's full-sized avatar
🧱

David Shaffer flanger001

🧱
View GitHub Profile

TIL if you have decided Elasticsearch maybe shouldn't get 50% of your RAM on your local machine you can adjust it with JVM options:

$ elasticsearch_path="$(brew --prefix)/etc/elasticsearch" # Assuming a Homebrew install on a Mac
$ mkdir -p $elasticsearch_path/jvm.options.d && echo "-Xms2g\n-Xmx2g" > $elasticsearch_path/jvm.options.d/heap.options
$ unset elasticsearch_path

Then restart the server:

@flanger001
flanger001 / containers.js
Last active August 7, 2023 16:40
If you use Firefox Multi-Account Containers with Firefox sync, sometimes you will get a number of extra containers, even thousands of them. Run this in the devtools console in the Firefox containers section `about:preferences#containers`. Add your own container tags on line 48.
let removeContainers = (...containers) => {
let items, isValid, removeButtons;
items = document.querySelectorAll("#browserContainersGroupPane richlistitem");
isValid = (el) => typeof (el) != "undefined" || el != null;
removeButtons = [];
items.forEach((el, idx) =>
{
const hbox_1 = el.getElementsByTagName("hbox").item(0);
trap("SIGINT") { exit! }
total_width = `stty size`.scan(/\d+/)[1].to_i # terminal width
snokflakes = {}
puts "\033[2J"; # clearing output
loop do
snokflakes[rand(total_width)] = 0
- name: LD-47K
brand_name: Neumann
model: U47
description: Created in 1947, Neumann U47 has stood the test of time as the ultimate studio mic. Extensively used by The Beatles, Frank Sinatra, and countless others, only about 6,000 of these mics were produced. The Neumann U47 analyzed for this model has a fully brass capsule with a screw-mounted mylar diaphragm and a genuine VF14 tube.
- name: LD-87
brand_name: Neumann
model: U87
description: The Neumann U87 was brought to market as a replacement for the U67, even though it sounds quite different. The LD-87 model is based on a mid-’70s version with a split backplate capsule which sounds slightly different from a modern 87. The high-pass filter and pad switch settings are also fully modeled.
- name: LD-87 Modern
brand_name: Neumann
@flanger001
flanger001 / integer_extensions.rb
Created January 11, 2024 20:16
Binary nonsense
# frozen_string_literal: true
module IntegerExtensions
refine Integer do
def as_binary_string(width = nil)
width ||= self.bit_length
"%0#{width}b" % self
end
def as_byte