Skip to content

Instantly share code, notes, and snippets.

View iainsproat's full-sized avatar
🏠
Working from home

Iain Sproat iainsproat

🏠
Working from home
View GitHub Profile
@jmoy
jmoy / thin-film.ipynb
Last active November 18, 2018 19:51
Why soap bubbles are colorful and windowpanes are not
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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"
@PieterScheffers
PieterScheffers / docker-raspberry-pi.sh
Created May 30, 2017 12:49
Build ARM docker images for Raspberry Pi with QEMU
# https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
### Choose a base image with QEMU binary
# FROM hypriot/rpi-alpine
# FROM resin/rpi-raspbian
# FROM resin/raspberry-pi-alpine-node:slim
### Register QEMU in the build agent
docker run --rm --privileged multiarch/qemu-user-static:register --reset
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active June 25, 2024 07:29
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@daredude
daredude / docker-clear.bat
Created June 5, 2016 10:53
delete all docker container and images on windows
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
@vasanthk
vasanthk / System Design.md
Last active June 23, 2024 04:30
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@mbostock
mbostock / .block
Last active March 29, 2023 00:13
Lab and HCL Color Spaces
license: gpl-3.0
@thecodejunkie
thecodejunkie / gist:2466652
Created April 22, 2012 20:24
Sample of how you could get rid of the magic string
using Nancy;
using Nancy.Extensions;
public class Home : NancyModuleBase
{
public Home()
{
Get["/"] = parameters => {
return "Hello";
};