Skip to content

Instantly share code, notes, and snippets.

@stephen-hannam
stephen-hannam / bootable_usb_iso.md
Last active November 3, 2022 09:22
USB ISO: Use DD & MKFS to Make a Bootable USB from ISO in BASH

DD, MKFS -> bootable ISO

$ umount /dev/sdx*
$ sudo fdisk –l
$ sudo mkfs.vfat /dev/sdx –I
$ sudo dd if=[path to iso] of=/dev/sdx

monitor progress $ pgrep –l ‘^dd$’ get the PID returned $ kill –USR1 [PID]

@laobubu
laobubu / ABOUT.md
Last active October 25, 2025 18:35
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@alecjacobson
alecjacobson / real-time-latex-in-browser.html
Last active December 4, 2025 10:55
Real-time LaTeX web application using MathJaX (e.g., for doing math during a Skype call)
<!DOCTYPE html>
<html>
<head>
<title>Real-time LaTeX in browser</title>
<!-- https://github.com/mathjax/MathJax/blob/master/test/sample-dynamic-2.html -->
<!-- Copyright (c) 2012-2015 The MathJax Consortium -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
@jl
jl / pkg-config-mac.md
Created February 20, 2016 05:40
Installing pkg-config from source on OS X
@glen-cheney
glen-cheney / encoding-video.md
Last active December 12, 2025 23:58
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@paulmach
paulmach / serve.go
Last active January 29, 2026 16:10
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@kachayev
kachayev / auth_file_server.go
Created August 16, 2013 14:27
Basic Authentication for http.FileServer
package main
import (
"fmt"
"net/http"
auth "github.com/abbot/go-http-auth"
)
func Secret(user, realm string) string {
if user == "john" {