Skip to content

Instantly share code, notes, and snippets.

View smuda's full-sized avatar

John Allberg smuda

View GitHub Profile
@smuda
smuda / delete.sh
Created January 7, 2024 09:54
Delete a AWS vault with existing archives
#!/bin/bash
#set -eu
#set -x
set -o pipefail
GLACIER_NAME=${GLACIER_NAME:-QNAP2019-08-24}
AWS_REGION=${AWS_REGION:-eu-west-1}
AWS_ACCOUNT_ID=${AWS_ACCOUNT_ID:--}
JOB_ID=
JOB_RESULT_FILE=job-output.json
@smuda
smuda / Instruction.md
Created December 1, 2018 19:11
Prepare to run terraform with aws

Terraform

  1. Install terraform and aws cli
brew install terraform awscli
  1. Configure aws cli
aws configure
AWS Access Key ID [None]: 
@smuda
smuda / setup.sh
Last active December 1, 2018 12:37
Commands to run on a new Mac
# Disable creating '.ds_store' on USB volumes
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Disable creating '.ds_store' on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Destroy vault keys on standby
sudo pmset destroyfvkeyonstandby 1
# Disable guest account
#Installing CentOS on Intel Compute Stick STCK1A32WFC
## BIOS upgrade
1. Download BIOS update from https://downloadcenter.intel.com/product/86612/Intel-Compute-Stick-STCK1A32WFC
In my case I upgraded from inside Windows, otherwise:
1. Place the BIOS update (the FC0035.bio file) on a FAT32 USB drive
2. Boot the device, holding down the F7 key.
3. Select the storage device
@smuda
smuda / SetupSSHForwardingOnQNAP.md
Created November 19, 2017 04:26
Setup SSH forwarding on QNAP NAS

On receiving NAS:

setcfg LOGIN "SSH AllowTcpForwarding" TRUE
reboot

On client to forward local port 8443 to the QNAP admin interface:

ssh user@host -L 8443:localhost:443
@smuda
smuda / gist:02f831386c68733412b526347119fe7c
Created February 16, 2017 18:50
Stop IOT LAN to access the other LANS using UBNT Edgerouter
// create a name for the LAN networks
configure
set firewall group network-group LAN_NETWORKS
set firewall group network-group LAN_NETWORKS description "LAN Networks"
set firewall group network-group LAN_NETWORKS network 192.168.0.0/16
commit
// Create a rule to accept all already established connections (for example from LAN)
configure
set firewall name PROTECT_IOT default-action accept