Skip to content

Instantly share code, notes, and snippets.

Nathan Youngman nathany

Block or report user

Report or block nathany

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@enricofoltran
enricofoltran / main.go
Last active Dec 10, 2019
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
View nd-matrix.go
package main
import (
"image"
"image/color"
"math"
"math/rand"
"time"
"github.com/peterhellberg/natsdraw"
@curtisallen
curtisallen / Readme.md
Created May 1, 2017
Danger with gometalinter
View Readme.md

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 Apr 3, 2019
Swift Ownership Manifesto TL;DR
View OwnershipTLDR.md

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 Sep 17, 2019
Docker Health Check using Make
View Dockerfile
FROM nginx
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000}
@peterhellberg
peterhellberg / evdev-bobblehat.go
Created Sep 18, 2016
How to use the Raspberry Pi Sense HAT Joystick using golang-evdev
View evdev-bobblehat.go
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 Jul 20, 2016
Homebrew Formula for musl-based GCC cross-compilers.
@dansimau
dansimau / go.sh
Last active Nov 30, 2017
Bash functions for navigating Go workspaces ("Go-go!")
View go.sh
#
# Change to the directory of the specified Go package name.
#
gg() {
paths=($(g "$@"))
path_index=0
if [ ${#paths[@]} -gt 1 ]; then
c=1
View mix.exs
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,
View github-pages-https-lets-encrypt.md
You can’t perform that action at this time.