Skip to content

Instantly share code, notes, and snippets.

View lachlan-eagling's full-sized avatar

Lachlan Eagling lachlan-eagling

  • Hobart, Australia
  • 03:53 (UTC +11:00)
View GitHub Profile
@SwiftyAlex
SwiftyAlex / squishybuttonthing.swift
Created April 20, 2024 15:20
squishybuttonthing
// Credit to Raffi for the design! https://twitter.com/raffichill/status/1781492309500027206
struct SquishyButtonThing: View {
@State var expanded: Bool = false
var body: some View {
VStack {
Spacer()
VStack {
@yo-bur
yo-bur / config.vpn
Created January 8, 2019 11:50
Mac PPTP VPN
plugin PPTP.ppp
noauth
remoteaddress "<HOST>"
user "<USERNAME>"
password "<PASSWORD>"
redialcount 1
redialtimer 5
idle 1800
# mru 1368
# mtu 1368
@mattes
mattes / check.go
Last active October 13, 2025 14:50
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}