Skip to content

Instantly share code, notes, and snippets.

View AlexJHayward's full-sized avatar
🍺

Alex Hayward AlexJHayward

🍺
View GitHub Profile
@AlexJHayward
AlexJHayward / macOS_wallpaper_location.md
Created March 8, 2021 22:50
Finding the Location of macOS Wallpaper

I was using Wallpaper wizard for just one wallpaper, so I went to get it out of the application support. Turns out it's super easy to find where that is. Thanks to Nimesh Neema in this stackoverflow post.

osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)'
@AlexJHayward
AlexJHayward / vim_configuration.md
Last active April 18, 2023 16:45
My Vim Configuration
  1. Add the below to ~/.vimrc
  2. You might need to install elixir-ls from source to get it all working properly.
  3. Install ripgrep brew install ripgrep
  4. Add the following to your .zshrc:
if type rg &> /dev/null; then
  export FZF_DEFAULT_COMMAND='rg --files'
  export FZF_DEFAULT_OPTS='-m'
fi
@AlexJHayward
AlexJHayward / raspberrypi_audio_server.md
Created January 17, 2021 18:34
Setting up a RaspberryPi as an Audio Server for Spotify and Airplay.

Setting Up a Raspberry Pi as an Audio Server

0. Setup

This is optional, but I like to setup from fresh when the pi is just being used for one purpose:

  1. Install the Raspberyy Pi Images: https://www.raspberrypi.org/software/
  2. Install a fresh copy of Raspberry Pi OS Lite on to an SD card
  3. Configure WiFi to run the pi headless (pay attention to the capitalisation of the network name, one wrong character had me scratching my head for a while):
@AlexJHayward
AlexJHayward / firacode_dark_JSONView.css
Created June 15, 2020 15:42
A dark theme for the JSONView Chrome plugin using the Fira Code font
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');
body {
white-space: pre;
font-family: 'Fira Code', monospace;
color: white;
background: black;
}
.property {
color: orange;
@AlexJHayward
AlexJHayward / finatra-example.scala
Created November 6, 2018 11:25
A minimal example of request timeout not working with finatra
import com.twitter.conversions.time._
import com.twitter.finagle.Http
import com.twitter.finagle.http.Request
import com.twitter.finatra.http.routing.HttpRouter
import com.twitter.util.Future
object Application extends Server {}
class Server extends com.twitter.finatra.http.HttpServer {
override protected def configureHttp(router: HttpRouter): Unit = {