Skip to content

Instantly share code, notes, and snippets.

@bketelsen
bketelsen / gaweb.service
Created December 5, 2017 20:10
systemd unit file for a go web app
# /etc/systemd/system/gaweb.service
[Unit]
Description=gopheracademy website
[Service]
PIDFile=/tmp/gaweb.pid-3001
User=gaweb
Group=gaweb
Environment=GO_ENV=production
Environment=POSTGRES_PASSWORD=SomePassWord
@haiitch
haiitch / gossamy.go
Created May 26, 2017 00:22
Basic Gossamy abstraction
package gossamy
type Controller interface {
// here go user events
}
type Arranger interface {
func Arrange()
// here go
}

Hi Zach :D

Modals are funny beasts, usually they are a design cop-out, but that's okay, designers have to make trade-offs too, give 'em a break.

First things first, I'm not sure there is such thing as a "simple" modal that is production ready. Certainly there have been times in my career I tossed out other people's "overly complex solutions" because I simply didn't understand the scope of the problem, and I have always loved it when people who have a branch of experience that I don't take the time

@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@jboner
jboner / latency.txt
Last active May 10, 2024 14:27
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD