Skip to content

Instantly share code, notes, and snippets.

View byronmansfield's full-sized avatar

Byron Mansfield byronmansfield

View GitHub Profile
@byronmansfield
byronmansfield / app.py
Last active April 24, 2020 23:52
Example for python api call json
#!usr/bin/env python
import json
import requests
API_KEY = 'abcxyz'
url = 'https://example.com/v1/api/endpoint'
params = dict(key=API_KEY, format=json)
@byronmansfield
byronmansfield / install-libtool-from-src-mac
Last active October 11, 2022 20:10
Install libtool from source Mac OS X
# Install libtool from source on Mac OS X
# prepare workspace
mkdir -p ~/code/build-from-src/ && cd $_
# download source code
curl -LO https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz
# expand
tar -xf libtool-2.4.6.tar.xz
@byronmansfield
byronmansfield / install-coreutils-from-src-mac
Last active November 27, 2023 18:44
Install coreutils from source Mac OS X
# Install coreutils from source on Mac OS X
# prepare workspace
mkdir -p ~/code/build-from-src/ && cd $_
# download source code
curl -LO https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz
# expand
tar -xJvf coreutils-8.31.tar.xz
@byronmansfield
byronmansfield / install-openssl-from-src-mac
Last active December 15, 2023 05:51
Install OpenSSL from source Mac OS X
# Install OpenSSL from source on Mac OS X
# prepare workspace
mkdir -p ~/code/build-from-src/ && cd $_
# download source code
curl -LO https://www.openssl.org/source/openssl-1.1.1d.tar.gz
# expand tar
tar -xzvf openssl-1.1.1d.tar.gz
@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

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 / 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
@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 / 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 / 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