Skip to content

Instantly share code, notes, and snippets.

@dmlittle
dmlittle / ci.yml
Created May 29, 2021 04:50
GitHub Actions Postgres service container example
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
@dmlittle
dmlittle / gist:42588d6adb956d146d198ccfd5120be5
Created May 18, 2021 21:53
Hammerspoon Window Management
hs.hotkey.bind({"cmd", "ctrl"}, "H", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2
@dmlittle
dmlittle / README.md
Last active May 20, 2020 00:04
Installing Redis 6.0.3 w/ TLS via Homebrew

Redis 6.0 w/ TLS

Redis 6 introduced native TLS support. This means that you can now use redis-cli to connect to AWS, GCP, Azure Redis instances that require TLS connections using the -tls flag. Unfortunately TLS is disabled by default and installing Redis via homebrew won't inlcude the TLS features enabled. Below is a quick guide on how to install Redis w/ TLS enabled.

Installation Guide

  1. Install the OpenSSL development library dependencies
    $ brew install openssl 
  2. Create relevant symlinks so that the Redis make install script can locate the OpenSSL development libraries
@dmlittle
dmlittle / 19_goto.sh
Created June 13, 2019 23:09
goto shell function to easily navigate to different directories
# paths in which to find projects or directories
# top path wins
goto-refresh-search-paths () {
setopt nullglob
goto_search_paths=(
$GOPATH/src/*/*
~/Developer
)
unsetopt nullglob
}
@dmlittle
dmlittle / matches.csv
Created June 17, 2018 00:20
2018 FIFA Worldcup API
StageName GroupName Date StadiumName HomeTeamName AwayTeamName DataUrl
First stage Group A 2018-06-14T15:00:00Z Luzhniki Stadium Russia Saudi Arabia https://api.fifa.com/api/v1/live/football/17/254645/275073/300331503
First stage Group A 2018-06-15T12:00:00Z Ekaterinburg Arena Egypt Uruguay https://api.fifa.com/api/v1/live/football/17/254645/275073/300353632
First stage Group B 2018-06-15T15:00:00Z Saint Petersburg Stadium Morocco IR Iran https://api.fifa.com/api/v1/live/football/17/254645/275073/300331526
First stage Group B 2018-06-15T18:00:00Z Fisht Stadium Portugal Spain https://api.fifa.com/api/v1/live/football/17/254645/275073/300331524
First stage Group C 2018-06-16T10:00:00Z Kazan Arena France Australia https://api.fifa.com/api/v1/live/football/17/254645/275073/300331533
First stage Group D 2018-06-16T13:00:00Z Spartak Stadium Argentina Iceland https://api.fifa.com/api/v1/live/football/17/254645/275073/300331515
First stage Group C 2018-06-16T16:00:00Z Mordovia Arena Peru Denmark https://api.fifa.com/