Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Lockney tlockney

View GitHub Profile
View cloudSettings
{"lastUpload":"2020-11-24T02:26:27.428Z","extensionVersion":"v3.4.3"}
@tlockney
tlockney / boxstarter.ps1
Last active Aug 28, 2018 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@tlockney
tlockney / reading.md
Last active Mar 29, 2017
How I read so much
View reading.md

I've been asked by a few colleagues how I manage to read so much, so I thought I'd just write this up once so I can link to it later. :~)

First, here are a few articles that touch on some of the keys to how I read so much and how I make sure I remember the important bits:

I can’t say I follow these exact principles – among other things, I’m definitely less diligent about some of my reading than what they outline. But that’s a conscious choice in many (but not all) cases.

@tlockney
tlockney / either example
Created Sep 14, 2016
Simple example of right-biased Either
View either example
[info] Loading global plugins from /Users/tlockn/.sbt/0.13/plugins
[info] Set current project to eitherdemo (in build file:/Users/tlockn/tmp/eitherDemo/)
SBT  eitherdemo  set scalaVersion := "2.11.7"
[info] Defining *:scalaVersion
[info] The new value will be used by *:allDependencies, *:crossScalaVersions and 12 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to eitherdemo (in build file:/Users/tlockn/tmp/eitherDemo/)
SBT  eitherdemo  console
[info] Updating {file:/Users/tlockn/tmp/eitherDemo/}eitherdemo...
@tlockney
tlockney / tmux.conf
Last active May 18, 2017
Make tmux awesome (probably not nearly as awesome as it *could* be)
View tmux.conf
# set the command prefix to `
set -g prefix "`"
unbind C-b
bind "`" send-prefix
# listen to alerts from all windows
set -g bell-action any
set -g default-shell /usr/local/bin/fish
set -g default-command fish
View ct.fish
function ct
# infer a session name from the current dir and normalize it for a valid tmux session name
set -g session (basename (pwd) | sed 's/[\.\-]/_/g')
tmux attach -t $session; or tmux new-session -s $session
end
@tlockney
tlockney / questions.md
Last active Nov 24, 2015
What questions would you put on a phone screen for a distributed systems position?
View questions.md

What questions would you put on a phone screen for a distributed systems position?

These come from @tsantero with the last two additions being curteousy of @ifesdjeen in reply to this question from @SeanTAllen.

  1. explain the life of an http request.
  2. what does the FLP result teach us?
  3. what is a byzantine failure?
  4. explain CRDTs
  5. explain linearizability.
  6. how does DNS work?
View gist:1a0dbe6f8bd437b07d5f
lazy val port = new ServerSocket(0).getLocalPort()
@tlockney
tlockney / .tmux.conf
Created Jun 18, 2014
Tmux conf for remapping the prefix key
View .tmux.conf
# set the command prefix to `
set -g prefix "`"
unbind C-b
bind "`" send-prefix
@tlockney
tlockney / Foo.java
Created Jun 13, 2014
A simple example where basic String concatenation in Java is really better than a StringBuilder.
View Foo.java
public class Foo {
static final String aConstant = "a constant";
public void concatSimpleString() {
String aString = "one" + aConstant + "two";
}
public void concatWithStringBuilder() {
StringBuilder sb = new StringBuilder();