Skip to content

Instantly share code, notes, and snippets.

@philandstuff
philandstuff / scale-summit.org
Last active August 29, 2015 13:57
scale-summit 2014

Scale Summit 2014

Intro, MBS

ideas for sessions

  • bootstrapping environments (without object stores)
  • service discovery
  • removing spofs
package main
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"net/http"
_ "net/http/pprof"
@dougireton
dougireton / recruiter_response.md
Last active January 11, 2020 22:52
I've started responding to recruiters with this list of requirements

Company Requirements

I'm definitely not looking for work. However to provide some helpful guidance for hiring like-minded engineers, I would only consider working for a company if it met these requirements:

  1. Fewer than 250 employees.
  2. Concrete, measurable plan to increase the number of women and minorities in engineering roles.
  3. Commitment to using and contributing to open source.
  4. Collaborative, friendly atmosphere where pair programming is encouraged.
  5. Meaningful work with clear linkage between work and company goals.
  6. Demonstrated commitment to ethical business practices, e.g. B corp certification.
@partiallyblind
partiallyblind / CPH.md
Created July 22, 2015 11:16
Mr Booth asked for a list of recommendations for things to do in Copenhagen. Here you go:

Things I like to do while visiting Copenhagen

Client SSL Authentication

The use case I had when I implemented client SSL authentication was to secure a web interface for a centralised log service that I was running. I wanted it to have it available, securely, on the public internet. I implemented it using nginx's ssl module.

I only had this available for 4-5 developers. I think I'd only attempt to use this for anyone who is comfortable with SSH keys or if it was an API client. I think the technical bar is a little too high for anything else.

I wrote some scripts, which I've pushed to a public GitHub repository: olly/heracles. The README is a mix of actual commands that work, and thoughts for how things could be configured. The idea was for it to generate CAs, server certificates and client certificates, and store them in a git repository for easy backup. There in a fairly rough state, but what's there works and I had tested on a real setup.

Authorizatio

@psd
psd / all.txt
Last active April 6, 2016 11:23
Find words containing all of the vowels, in order
$ egrep 'a.*e.*i.*o.*u' /usr/share/dict/words
abietineous
abstemious
abstemiously
abstemiousness
abstentious
acetabuliferous
acetarious
acheilous
acheirous

Software I use

Enforced keyboard breaks

First things first — I've had RSI and incessant pain before, and I don't want it again. There are many instances of keyboard break software, but the one I use is AntiRSI. It's available from the Mac App Store for a fiver, and its worth every penny to me. If you prefer free, an older version is still available. I enforce it always being running (but with the ability to turn it off when playing games) with a script I run from cron.

Controlling my computer

I use LaunchBar for more things than I can count. A Mac just doesn't seem to work right until I've got LaunchBar working.

I have run an nginx container...
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6d67de07731d nginx "nginx -g 'daemon ..." 40 minutes ago Up 40 minutes 80/tcp, 443/tcp epic_goldberg
I want to use Debian for debug:
docker run -it --pid=container:6d67de07731d --net=container:6d67de07731d --cap-add sys_admin debian
I can see the nginx process:
// Largely copied (with some modernisation applied) from:
// https://github.com/reem/rust-lazy/blob/master/src/single.rs
use std::cell::UnsafeCell;
use std::ptr;
use std::ops::{Deref, DerefMut};
use self::Inner::{Evaluated, EvaluationInProgress, Unevaluated};
pub trait Invoke<A = (), R = ()> {