Skip to content

Instantly share code, notes, and snippets.

donovansolms / autostart_windows.go
Created March 3, 2019 20:20
Hack ProtonMail/go-autostart for Windows start menu item
package autostart
// #cgo LDFLAGS: -lole32 -luuid
#include <stdint.h>
#include <windows.h>
uint64_t CreateShortcut(char *shortcutA, char *path, char *args);
donovansolms / hwinfo.go
Last active October 14, 2018 17:18
A sample of getting information (CPUs, Memory, GPUs, OS) from the current system in Go.
package main
import (

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers