Skip to content

Instantly share code, notes, and snippets.

View justintout's full-sized avatar
🥭

Justin Tout justintout

🥭
View GitHub Profile
@justintout
justintout / action-rsync.md
Created September 22, 2022 05:47
Steps to setting up `rsync` deployment from a Github Action

Simple rsync deploys from Github Actions

I use rsync to deploy my personal website. I rambled on about it in a post over there but wanted to go through the steps I followed in a more focused way, since I didn't find them collected in one place. Here's a contrived example. Let's assume you're the proud new owner of my-neat-website.biz.

If you wanted to deploy to your website the same way I do, here's how:

I use this configuration to serve multiple websites from the same server.

@justintout
justintout / my-adblocking.md
Created February 10, 2022 22:55
Very hand-wavy summart of how I block ads on most of my devices

My Ad Blocking

This is a very hand-wavy summary of how I block ads on most of my devices.

To start, my favorite form of adblocking is literally blocking Twitter accounts that post sponsored tweets. This doesn't really do anything, it's just cathartic.

There is a legitimate ethical debate to have about blocking ads on the internet. I do not care. I find advertising hostile.

@justintout
justintout / gist:234b01b95790f66fbcf735442e19cc9b
Created July 23, 2021 14:02
You don't need a mutex to fill a known-size slice in parallel.
package main
import (
"fmt"
"golang.org/x/sync/errgroup"
)
func main() {
a := make([]string, 10)
@justintout
justintout / tic-tac-toe.go
Last active April 8, 2021 04:00
2 player Tic-Tac-Toe in Go
package main
import (
"fmt"
"os"
"strconv"
)
type player int
@justintout
justintout / decoder-middleware.go
Created July 18, 2019 20:59
Decode specific request bodies with a middleware and stuff into request's context
package main
// All of the fields
// $ curl -d '{"name":"asdf", "value": 0, "Nickname": "Asdf"}' localhost:8080/thing
// {"Thing":{"ID":1234,"Name":"asdf","Value":0,"Nickname":"Asdf"}}
// Optional left as empty string
// $ curl -d '{"name":"asdf", "value": 0, "Nickname": ""}' localhost:8080/thing
// {"Thing":{"ID":1234,"Name":"asdf","Value":0,"Nickname":""}}

Keybase proof

I hereby claim:

  • I am justintout on github.
  • I am jttout (https://keybase.io/jttout) on keybase.
  • I have a public key ASA5g4JnZMbOZ47unVYMxCqHjQd9xNBuMJNKz3o4Km-Q7Ao

To claim this, I am signing this object:

" Sets how many lines of history VIM has to remember
set history=700
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread