Skip to content

Instantly share code, notes, and snippets.

@abscondment
abscondment / build-run-test.sh
Last active November 14, 2023 16:06
docker-nginx-unprivileged build/run/test script
#!/usr/bin/env bash
set -euo pipefail
MAINLINE_VERSION=${MAINLINE_VERSION:-1.25.3}
STABLE_VERSION=${STABLE_VERSION:-1.24.0}
# Platforms based on https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/README.md#architectures
ALPINE_PLATFORMS=(amd64 arm/v6 arm/v7 arm64 386 ppc64le s390x)
DEBIAN_PLATFORMS=(amd64 arm/v5 arm/v7 arm64 386 mips64le ppc64le s390x)
source 'https://rubygems.org'
gem 'grpc', '~> 1.0.0'
# prerelease protobuf magic
git 'git@github.com:google/protobuf.git', tag: 'v3.0.0' do
gem 'google-protobuf'
end
group :development, :test do
This file has been truncated, but you can view the full file.
WHITE-JACKET.
CHAPTER I.
THE JACKET.

Background

This article asserts that consuming Himalyan salt, which clocks in with lead content at 100 ppb, is incredibly dangerous. The supplied evidence is that water with lead content of 5 ppb is declared unsafe, so obviously the salt must be unsafe as well.

Here are some calculations:

Salt:

  • The FDA recommends consuming no more than 2300 mg per day, but many sites cite them as saying 3400. People like salt; let's use the higher number!
  • 3400mg per day
AllCops:
Exclude:
- "vendor/**/*"
- "db/schema.rb"
UseCache: false
Style/CollectionMethods:
Description: Preferred collection methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
Enabled: true
PreferredMethods:
#!/bin/bash
for d in {essential-apps,essential-baseline,essential-gem,essential-payments}
do
echo "configuring linters for $d:"
for config in {.hound.yml,.ruby-style.yml}
do
echo " ✔ $config"
cp "essential-service/$config" "$d"
done
echo
require 'yaml'
class Base < Struct.new(:base_id)
def doit
puts 'i have %s' % self.base_id
end
end
class Thing < Base
attr_accessor :foo
This file has been truncated, but you can view the full file.
19,miles_davis_kind_of_blue,purchase
19,daft_punk_discovery,purchase
19,radiohead_ok_computer_limited_edition,purchase
19,neutral_milk_hotel_in_the_aeroplane_over_the_sea,purchase
19,arcade_fire_neon_bible,purchase
20,acdc_back_in_black,purchase
30,fleetwood_mac_rumors,purchase
30,black_sabbath_paranoid,purchase
32,miles_davis_kind_of_blue,purchase
32,black_sabbath_paranoid,purchase
@abscondment
abscondment / input.txt
Created June 10, 2015 22:36
Sample mahout/spark input
19,miles_davis_kind_of_blue,purchase
19,daft_punk_discovery,purchase
19,radiohead_ok_computer_limited_edition,purchase
19,neutral_milk_hotel_in_the_aeroplane_over_the_sea,purchase
19,arcade_fire_neon_bible,purchase
20,acdc_back_in_black,purchase
30,fleetwood_mac_rumors,purchase
30,black_sabbath_paranoid,purchase
32,miles_davis_kind_of_blue,purchase
32,black_sabbath_paranoid,purchase
@abscondment
abscondment / PhD-Octopus.md
Created April 2, 2015 21:01
The PhD Octopus, by William James

Excerpted from Memories and Studies at Project Gutenberg.

I. THE PH.D. OCTOPUS[1]

Some years ago we had at our Harvard Graduate School a very brilliant student of Philosophy, who, after leaving us and supporting himself by literary labor for three years, received an appointment to teach English Literature at a sister-institution of learning. The governors of this institution, however, had no sooner communicated the appointment than they made the awful discovery that they had enrolled