Skip to content

Instantly share code, notes, and snippets.

@arainho
arainho / config.fish
Created May 29, 2018 11:23
Fish Shell - User initilization file
set -g fish_user_paths "/usr/local/sbin" $fish_user_paths
set -g fish_user_paths "$HOME/bin" $fish_user_paths
set -e GPG_AGENT_INFO
set -e SSH_AGENT_PID
set -x GPG_TTY (tty)
set -x SSH_AUTH_SOCK ~/.gnupg/S.gpg-agent.ssh
set LC_CTYPE en_US.UTF-8
set LC_ALL en_US.UTF-8

Keybase proof

I hereby claim:

  • I am arainho on github.
  • I am arainho (https://keybase.io/arainho) on keybase.
  • I have a public key ASBj2D8_SB1m4p6-ZeMiGJAaoBbCSW7CNEQ14Xgvb6X9LAo

To claim this, I am signing this object:

#!/usr/bin/env bash
SUDO=/usr/bin/sudo
BREW=/usr/local/bin/brew
# prerequisites
# install macos command line tools
CLT_DIR=`xcode-select -p`
RV=$?
if ! [ $RV -eq '0' ]
@arainho
arainho / setup-interlock.sh
Last active March 24, 2020 00:51
Setup interlock on usbarmory debian image
#!/usb/bin/env bash
# Setup interlock on 'usbarmory-debian-base_image'
# INTERLOCK - file encryption front end
INTERLOCK_REPO_TAG="v2019.01.30" # use this tag for signal support
# add andrea (inversepath) gpg key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 73C9E98B25B61D15
wget http://keys.inversepath.com/gpg-andrea.asc -O gpg-andrea.asc
@arainho
arainho / macoc_fortress_debug.sh
Last active March 28, 2020 00:50
macOS-Fortress debug script
#!/usr/bin/env bash
echo ''
echo -n "blackhole ... "
export http_proxy=""
if curl -s --head http://localhost:8119/ | head -n1 | grep -E "(200 OK)" --color > /dev/null > /dev/null
then
echo "http://localhost:8119 [✅]"
else
echo "[❌]"
@arainho
arainho / archlinux_unbound.sh
Last active April 15, 2020 16:41
Unbound setup on ArchLinux
# Unbound is a validating, recursive, and caching DNS resolver.
https://wiki.archlinux.org/index.php/Unbound
# install unbound, expat
sudo pacman -Syy --noconfirm unbound expat ldns bind-tools
# setup etckeeper
sudo pacman -Syy --noconfirm etckeeper
git config --global user.email "me@armory"
git config --global user.name "Me Myself and I"
@arainho
arainho / install_vault.sh
Last active June 24, 2020 09:11
Script to install Vault
#!/usr/bin/env bash
export VERSION=1.4.2
wget https://releases.hashicorp.com/vault/${VERSION}/vault_${VERSION}_linux_amd64.zip
# unzip the package and remove the zip file:
unzip vault_${VERSION}_linux_amd64.zip && rm vault_${VERSION}_linux_amd64.zip
# vault runs as a single binary named vault, other files in the package can be safely removed
ls -al | grep vault
@arainho
arainho / install_docker.sh
Last active July 13, 2020 13:17
install docker - debian
#!/usr/bin/env bash
# Setup docker and docker-compose ( no prompts )
### Uninstall old versions ###################################################
sudo apt-get -y remove docker docker-engine docker.io containerd runc
### SET UP THE REPOSITORY ###################################################
# Update the apt package index
@arainho
arainho / void_interlock.sh
Last active February 19, 2021 16:57
Setup interlock on 'Void Linux'
#!/usb/bin/env bash
# Setup interlock on USB armory (armv7) for 'Void Linux' or 'ArchLinux.'
# INTERLOCK - file encryption front end
#luks partition start
PARTITION_START="6820MB"
#use this tag for signal support
INTERLOCK_REPO_TAG="v2019.01.30"
@arainho
arainho / rpi4_share_internet.sh
Created May 18, 2022 07:32
Share Raspberry LAN internet with usbarmory
#!/bin/bash
WAN_IFACE="eth0"
USB_IFACE="usb0"
# apply config's
ip addr del 169.254.177.31/16 dev usb0
ip addr add 10.0.0.2/255.255.255.0 broadcast 10.0.0.255 dev usb0
sysctl net.ipv4.ip_forward=1