Skip to content

Instantly share code, notes, and snippets.

View nathany's full-sized avatar
🙃

Nathan Youngman nathany

🙃
View GitHub Profile
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
package main
import (
"image"
"image/color"
"math"
"math/rand"
"time"
"github.com/peterhellberg/natsdraw"
@curtisallen
curtisallen / Readme.md
Created May 1, 2017 19:22
Danger with gometalinter

Using gometalinter with Danger

Run your gometalinter command in CI with the --json command save output to a file e.g. lint.json

	go list -f '{{.Dir}}' ./... | grep -v 'vendor' | xargs gometalinter --vendored-linters --json > lint.json

Add the following to Dangerfile

# Show lint errors
@Gankra
Gankra / OwnershipTLDR.md
Last active April 3, 2019 22:44
Swift Ownership Manifesto TL;DR

Swift Ownership Manifesto TL;DR

Most of the manifesto is background and detailed definitions -- if you're confused or want details, read the manifesto!

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170213/032155.html

Note also that manifestos aren't complete proposals -- syntax and details may change!

One piece of background: inout is kinda complicated because it can be used on computed properties -- foo(&val.x) might be sugar for

@mixja
mixja / Dockerfile
Last active September 17, 2019 11:06
Docker Health Check using Make
FROM nginx
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000}
@peterhellberg
peterhellberg / evdev-bobblehat.go
Created September 18, 2016 11:58
How to use the Raspberry Pi Sense HAT Joystick using golang-evdev
package main
import (
"flag"
"fmt"
"os"
"os/signal"
evdev "github.com/gvalkov/golang-evdev"
screen "github.com/nathany/bobblehat/sense/screen"
@FiloSottile
FiloSottile / README.md
Last active July 20, 2016 20:15
Homebrew Formula for musl-based GCC cross-compilers.
@dansimau
dansimau / go.sh
Last active November 30, 2017 17:02
Bash functions for navigating Go workspaces ("Go-go!")
#
# Change to the directory of the specified Go package name.
#
gg() {
paths=($(g "$@"))
path_index=0
if [ ${#paths[@]} -gt 1 ]; then
c=1
defmodule App.Mixfile do
use Mix.Project
def project do
[app: :app,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!