Skip to content

Instantly share code, notes, and snippets.


Jeff Kreeftmeijer jeffkreeftmeijer

View GitHub Profile
View ansi_colors.adoc

Terminal colors with ANSI escape sequences

Terminal emulators use ANSI escape sequences to --amongst other things like controlling the cursor’s position-- read the desired text and background color when printing output.

$ echo -e "\033[31mred\033[m" # Prints "red" in red.

While most terminal emulators, including Apple’s, support true color now, most utilities use one of the main sixteen colors (black, red, green, yellow, blue, magenta, cyan, white, and a high intensity or bright version of each). For example, git shows diffs with additions in green and deletions in red, and most testing frameworks print green dots and red "F"s for failures.


Rails with mssql on macOS

Start mssql in docker

docker pull microsoft/mssql-server-linux:2017-latest
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=B4n44n123' -p 1401:1433 --name sql1 -d microsoft/mssql-server-linux:2017-latest
docker ps -a
jeffkreeftmeijer / math.ex
Created Aug 26, 2017
POC for type spec tests with StreamData.
View math.ex
defmodule Math do
@spec square(integer) :: integer
def square(a) do
a * a
jeffkreeftmeijer /
Last active Aug 21, 2017
Recipes I kept having to look up.

Roast potatoes

Roast potatoes


  • Salt
  • 1/2 teaspoon baking soda (~4g)
  • Potatoes

Boil for ~10 minutes

View .tmux.conf
# Use Ctrl-a instead of Ctrl-b as the tmux prefix
set-option -g prefix C-a
# Set the base index to 1 instead of 0 for both windows and panes.
set-option -g base-index 1
set-option -g pane-base-index 1
# Use vim keybindings in copy mode
setw -g mode-keys vi
jeffkreeftmeijer /
Last active Jan 30, 2019
enough.css is a tiny CSS style sheet with most of the styling you'll need for that blog of yours. It moved to
View http_server.rb
require 'socket'
require 'rack'
require 'rack/lobster'
app =
server = 5678
while session = server.accept
request = session.gets
puts request
jeffkreeftmeijer / appsignal-dark.terminal
Last active Nov 19, 2016
appsignal.terminal (, with SF Mono 14pt, 1,25 line spacing and disabled bells
View appsignal-dark.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View no_testsuites_element.xml
<?xml version="1.0"?>
<testsuite errors="0" failures="0" name="Elixir.JunitXmlTest" tests="0" time="0.00"></testsuite>
View gist:d243932dd41ef1f94aa48567cf50e83c
iPhone 5 still looking good. Source: Nö
I own a 2012 iPhone 5 and today I decided that I won’t be buying a new iPhone. I do like the new iPhones, it’s just that I don’t see the added value for me to buy a new one, and I think I’m not the only one in this situation. My “old” iPhone 5 holds up perfectly to my current needs. And I say “current needs” because “Back in the day” I would basically try out all the apps and play all the games. But Today, more than 80% of those apps are long gone. Either I lost interest or they made a really good mobile website that does the job just fine. Today, next to the native apps like Safari and mail, I only regularly use Reddit, Youtube and the mirror apps for Sketch and Photoshop. I have other apps installed, but those are just there when I need them. "You never know when you might need that QR scanner"? Wrong! You never need a QR scanner, so you can safely delete it.
That said, I don’t really need the newest A10 processor or a double photo lens in my daily use. It woul
You can’t perform that action at this time.