Skip to content

Instantly share code, notes, and snippets.

View Lavos's full-sized avatar

Kristopher Cost Lavos

View GitHub Profile
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active April 8, 2025 00:51
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@mholt
mholt / macapp.go
Last active March 24, 2025 19:19
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@jchandra74
jchandra74 / openssl.MD
Last active March 17, 2025 15:25
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@mbostock
mbostock / .block
Last active May 5, 2023 01:52
Localized Time Axis II
license: gpl-3.0
@euank
euank / Dockerfile
Last active March 14, 2023 23:40
ECS / EC2 Metadata entrypoint example
FROM golang:1.4
COPY entrypoint.sh /entrypoint.sh
COPY main.go main.go
RUN go build -o main main.go
RUN chmod +x /entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
CMD ["./main"]
@jordam
jordam / magiclight.py
Created August 13, 2015 12:59
A script to control MagicLight and other cheap wifi rgb lights
import socket, time
s = socket.socket()
address = ''
port = 5577
r = 0
g = 255
b = 0
keybit = "31".replace(':', '').decode('hex')
keybit += chr(r) + chr(g) + chr(b)
keybit += "00:f0:0f".replace(':', '').decode('hex')
@grendell
grendell / passwords
Created May 16, 2015 18:30
Axiom Verge Passwords
REVEAL-SUDRAN
Translates notes written in Sudran to English.
REVEAL-VYKHYA
Translates notes written in Vykhya to English.
JUSTIN-BAILEY
Trace sports the leotard of Metroid fame.
IKKIBU-LABIRU
@denji
denji / golang-tls.md
Last active March 29, 2025 16:46 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@montanaflynn
montanaflynn / proxy.go
Last active January 17, 2021 15:37
Golang reverse proxy
package main
import (
"log"
"net/http"
"net/http/httputil"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@jbardin
jbardin / proxy_copy.go
Last active June 28, 2023 22:12
Go TCP Proxy pattern
package proxy
import (
"io"
"log"
"net"
)
func Proxy(srvConn, cliConn *net.TCPConn) {
// channels to wait on the close event for each connection