Skip to content

Instantly share code, notes, and snippets.

View lee8oi's full-sized avatar

Lee Forest lee8oi

  • independant/hobby
  • Michigan, USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lee8oi on github.
  • I am leeforest (https://keybase.io/leeforest) on keybase.
  • I have a public key ASDAu1202M0wTBJSghLPrN0_zgrs5DLhYx-HeeREsovbJAo

To claim this, I am signing this object:

@lee8oi
lee8oi / get-albion.sh
Created May 11, 2017 05:28
A simple script for downloading the autoupdate archive for Albion Online.
#!/bin/bash
# This script downloads the autoupdate archive for Albion Online. Useful if you
# have had problems running the game after using the official installer.
#
# If the game mentions the client is out of date just run this script again
# to get the latest version.
rm albiononline*.zip manifest.xml* &> /dev/null # cleanup
wget http://live.albiononline.com/autoupdate/manifest.xml
filename=`cat manifest.xml | grep -Po '(albiononline-linux-full.*.zip)'`
wget http://live.albiononline.com/autoupdate/$filename
@lee8oi
lee8oi / startProcess.go
Last active September 10, 2024 18:10
Using os.StartProcess() in Go for platform-independent system command execution.
package main
import (
"os"
"os/exec"
)
func Start(args ...string) (p *os.Process, err error) {
if args[0], err = exec.LookPath(args[0]); err == nil {
var procAttr os.ProcAttr
@lee8oi
lee8oi / go.xml
Last active June 14, 2016 01:14
A modified version of the Go syntax highlighting for Kate/KDevelop designed to mimic Gist. Also adds new highlighting features (like declared functions return values).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
This file is part of KDE's Kate project
GO.XML supports syntax highlighting for the Go programming language
under Kate. Go is a compiled, garbage-collected, concurrent programming
language developed by Google Inc.
@lee8oi
lee8oi / goshell.go
Last active December 18, 2023 18:17
Running system commands interactively in Go using os/exec
package main
import (
"os"
"os/exec"
)
func Command(args ...string) {
cmd := exec.Command(args[0], args[1:]...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
@lee8oi
lee8oi / Bz2OnTheFly.go
Last active August 29, 2015 14:01
Download a tar.bz2 file, decompressing & extracting on-the-fly.
package main
import (
"archive/tar"
"compress/bzip2"
"io"
"log"
"net/http"
"os"
)