Skip to content

Instantly share code, notes, and snippets.

View nelsam's full-sized avatar

Samuel Nelson nelsam

  • Monticello, MN, USA
View GitHub Profile
@nelsam
nelsam / steam-sysinfo
Created November 1, 2018 15:42
steam system information
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 2700X Eight-Core Processor
CPU Family: 0x17
@nelsam
nelsam / coverage.sh
Created February 11, 2015 15:23
A little script to show coverage statistics locally
function help() {
echo "
Usage: $0 [-C] [-d] [-b BROWSER] [-p PACKAGE]
Options:
-t TYPE Use coverage type TYPE. Can be any of:
profile - Only write the coverage profile to coverage.out. Implies -d.
html - Write standard go coverage tool html output to coverage.html. Implies that coverage.html should not be removed.
gocov-html - Write gocov-html coverage tool html output to coverage.html. Implies that coverage.html should not be removed.
browser - Launch a browser session for the standard go coverage tool html output.
package datastore
import (
"errors"
"reflect"
"github.com/coopernurse/gorp"
)
// DbColumnStorer is a type that can be stored as a column's value
@nelsam
nelsam / dl_perf_fix.sh
Created January 29, 2015 19:33
Temperary Dying Light Performance Fix
#!/bin/bash
set -e
# Change this if your steam root is elsewhere
steam_root=~/.local/share/Steam
options_file="data/scripts/varlist_performance.scr"
cd "${steam_root}/SteamApps/common/Dying Light/DW/out"
@nelsam
nelsam / go-get-project.sh
Created January 21, 2015 05:01
A helper tool to set up a unique $GOPATH for each project I work directly on.
#!/usr/bin/env sh
set -e
development_root=~/dev
goimports="golang.org/x/tools/cmd/goimports"
golint="github.com/golang/lint/golint"
gocode="github.com/nsf/gocode"
if [[ "$#" -ne 1 ]]
@nelsam
nelsam / zsh-gopath-search.sh
Last active October 23, 2016 13:42
Every time the directory is changed in zsh, set $GOPATH (and additions to $PATH) by recursing up through parent directories, looking for a .gopath file
# Each time we change directory, look for some files that alter environment
# variables.
chpwd() {
emulate -L zsh
dir="$(pwd)"
while [[ "$dir" == "$HOME"* ]]
do
if [[ -f "${dir}/.gopath" ]]
then
@nelsam
nelsam / divinity-monk.md
Last active September 19, 2015 03:56
Divinity: Original Sin - monk-like build [WIP]

Rules:

I am defining a monk as a character who uses magical attacks and defenses in close combat. This basically means that we can create a monk-like character by simply restricting which spells he or she is allowed to learn. The restriction, then, is simply that the monk-like character cannot cast any spell with a range of greater than 5 meters.

There are some odd bits about certain skills that fit within this restriction, but don't seem like they would. For example, breath-like weapons have a length, not a range

@nelsam
nelsam / ecb_user_layouts.el
Created December 31, 2014 19:23
ECB User Layouts - My custom layout for ECB/emacs.
;;; .ecb-user-layouts.el --- user defined ECB-layouts
;; Copyright (C) 2001 - 2005 Jesper Nordenberg
;; Copyright (C) 2001 - 2005 Free Software Foundation, Inc.
;; Copyright (C) 2001 - 2005 Klaus Berndl <klaus.berndl@sdm.de>
;; Author: Klaus Berndl <klaus.berndl@sdm.de>
;; Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
;; Keywords: java, class, browser

Keybase proof

I hereby claim:

  • I am nelsam on github.
  • I am valczir (https://keybase.io/valczir) on keybase.
  • I have a public key whose fingerprint is 0D32 99FB 2159 C455 9027 0E8B BBF9 73D9 A22E B976

To claim this, I am signing this object:

@nelsam
nelsam / pacman.b
Last active November 11, 2023 15:20
WHY??? WHY DID I DO THIS?
++++++++++++++++
++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++.>+++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++.>++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++.>++++++++++++++++++++++++++++++++.>++++++++