Skip to content

Instantly share code, notes, and snippets.

View byronmansfield's full-sized avatar

Byron Mansfield byronmansfield

View GitHub Profile
@byronmansfield
byronmansfield / pointer.go
Last active January 23, 2016 22:07
Go pointer example
package main
func main() {
msg := "Hello from Golang"
greet(msg)
println(msg)
greetPrt(&msg)
println(msg)
@byronmansfield
byronmansfield / keybase.md
Created March 3, 2016 06:42
keybase proof

Keybase proof

I hereby claim:

  • I am byronmansfield on github.
  • I am bmansfield (https://keybase.io/bmansfield) on keybase.
  • I have a public key ASBwyvTJtQlh_F745fedyNZmOCrQQ-v-wtdjtJWY0uOa6Ao

To claim this, I am signing this object:

@byronmansfield
byronmansfield / install_tmux_osx_no_brew
Created March 28, 2017 02:18 — forked from Fi5t/install_tmux_osx_no_brew
Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
# Extract them
tar xzf tmux-2.3.tar.gz
@byronmansfield
byronmansfield / mac-install-from-src-gist-list
Last active January 12, 2020 16:52
List of all install from source gists for Mac OS X
# List of gists for tools I can install from source on mac without having to use homebrew (brew)
# coreutils - replaces `brew install coreutils`
https://gist.github.com/byronmansfield/86b81101930bfe027c641a2c11e152e8
# binutils - replaces `brew install binutils`
https://gist.github.com/byronmansfield/f32f55e58fc731c3d4215aa44f970226
# CMake - replaces `brew install cmake`
https://gist.github.com/byronmansfield/d2ca956cb3ee7c67d8d02c2b0db1c803
@byronmansfield
byronmansfield / cross-compile-go.sh
Created February 20, 2018 16:20
Cross Compile Golang Projects
for GOOS in darwin linux windows; do
for GOARCH in 386 amd64; do
GOOS=$GOOS GOARCH=$GOARCH go build -v -o my-app-$GOOS-$GOARCH
done
done
@byronmansfield
byronmansfield / bumpversion.sh
Created March 1, 2018 18:56
Example of a version bumping script for tagging deployment versions
#!/bin/bash
_cancel() {
echo "No version file created"
echo "Exiting"
exit 1
}
_invalid_input() {
echo "Invalid response"
@byronmansfield
byronmansfield / restart_bluetooth.txt
Created June 20, 2018 22:03
Restart Sierra Bluetooth
https://apple.stackexchange.com/questions/251842/how-to-restart-bluetooth-service-from-command-line
# Kill bluetooth daemon
sudo pkill blued
# you can list them like this if it is a different name
sudo launchctl list
# Stop and Start it manually
sudo launchctl stop com.apple.blued
@byronmansfield
byronmansfield / xps_arch_install.txt
Last active March 8, 2019 19:50
Dell XPS 9370 Arch Install
#
#
# Dell XPS 9370 Arch Install
#
#
# Arch Official Wiki - https://wiki.archlinux.org/index.php/Installation_guide
#
# Most of it follows the official guide and a few others
#
# heavily follows this guide for file system setup - https://pastebin.com/5gGCTchX

Setting up a new Arch install with existing password-store using Yubikey and GnuPG

These are instructions are for setting up your existing pass from the existing gpg keys and yubikey on a fresh Arch installation

Install required packages

yaourt -S pass gnupg2 pcsclite ccid yubikey-personalization hopenpgp-tools
@byronmansfield
byronmansfield / luks_resize.txt
Last active March 16, 2019 17:58
Modify size of Logical Volumes on Dell XPS with Arch
#
# Resize Logical Volume
#
#
# For reference https://wiki.archlinux.org/index.php/Resizing_LVM-on-LUKS#Enlarge_LVM_on_LUKS
#
# Stackexchange Thread: https://unix.stackexchange.com/questions/505241/resize-luks-volumes
# Reddit Thread: https://old.reddit.com/r/linuxquestions/comments/az6cgw/resize_my_luks_volumes/
#
# Originally set up from this: https://gist.github.com/byronmansfield/9e0797c89866c520f4a6b7b9c0f26421