Skip to content

Instantly share code, notes, and snippets.

View widdowquinn's full-sized avatar

Leighton Pritchard widdowquinn

View GitHub Profile
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active March 19, 2024 18:16
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@nickp60
nickp60 / kptrk.sh
Last active June 14, 2018 14:35
kptrk: KeeP TRacK of your shell comamnds
# The purpose of this script it to make working from the terminal a bit more reprodicible.
# It is very simple
# A boolean value (KPTRK_ON) is set to true when kptrk is invoked, and the current directory is recorded.
# when kptrk is invoked again, logging is turned off.
# it is built on top of https://github.com/rcaloras/bash-preexec
# Installation
# - install bash-pre-exec, see instructions here https://github.com/rcaloras/bash-preexec, or, in short:
# -- Pull down our file from GitHub and write it to our home directory as a hidden file.
@blahah
blahah / internet_of_data_transforms.md
Last active February 29, 2020 17:50
Ways dat can be leveraged to transform science, #1 - the internet of data transforms

dat is an incredibly powerful technology for peer to peer sharing of versioned, secure, integrity-guaranteed data.

One thing it excels at is populating a live feed of data points from one source, and allowing any number of peers to subscribe to that feed. The data can only originate from the original source (this is guaranteed using public-key encryption), but the peers in the network can still sync the new data with one another. To subscribe to a given source you only need to know an alphanumeric key that uniquely identifies the source, and is automatically generated by dat.

There are many ways that this simple system can be used to build a new infrastructure for science. This is the first in a series of posts in which I'll explain how.

Here I briefly describe some ways dat can be used to automate some aspects of scientific discovery, increase resource and information reuse efficiency, and help keep our information resources up to date with science (a topic I will expand on signif

@torresashjian
torresashjian / linux-kali-install-wifi-drivers.sh
Last active April 16, 2024 15:40
How to install Broadcom BCM43142 Drivers on Kali Linux
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms
modprobe -r b44 b43 b43legacy ssb brcmsmac bcma
modprobe wl
@jsonmaur
jsonmaur / spoof.sh
Last active November 13, 2017 11:42
Spoof MAC address on macOS
# network settings -> wifi -> advanced -> hardware
# change "configure" to "manually". save & apply.
# compare mac address to one you see in settings
ifconfig en0 | grep ether
# generate a new random one
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
# set spoofed address (substitute with generated one from above)
@yashodhank
yashodhank / kali-linux-wl-fix.sh
Last active November 13, 2017 11:43 — forked from speeddragon/kali-linux-wl-fix.sh
Kali Linux fix for "modprobe: FATAL: Module wl not found"
# Update and install necessary packages
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
# Download some extra packages, that do the trick for "wl module not found"
wget http://http.kali.org/kali/pool/main/l/linux-tools/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-amd64_4.3.3-5kali4_amd64.deb
# Install with correct order

How To Sync Your Movie to the Professional Jokes By Professional Comedy Professionals (AKA RiffTrax)

Intro

This guide started off as a sort of checklist for myself to try to refine, and speed up the process. I'm sure that there are a good number of things that can be improved upon, but in my opinion, the steps below produce pretty consistently good results. Hopefully this will help

@jsonmaur
jsonmaur / setup.sh
Last active November 13, 2017 11:43
Setup Kali on Macbook
# persistence from usb stick
mkdir -p /mnt/my_usb
mount /dev/sdb3 /mnt/my_usb
echo "/ union" > /mnt/my_usb/persistence.conf
umount /dev/sdb3 && reboot
# get wifi working
apt-get update
apt-get install -y linux-headers-$(uname -r) broadcom-sta-dkms
@speeddragon
speeddragon / kali-linux-wl-fix.sh
Last active February 18, 2024 13:05
Kali Linux fix for "modprobe: FATAL: Module wl not found"
# Update and install necessary packages
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
# Download some extra packages, that do the trick for "wl module not found"
wget http://http.kali.org/kali/pool/main/l/linux-tools/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-amd64_4.3.3-5kali4_amd64.deb
# Install with correct order

This hit #rstats today:

Has anyone made a dumbbell dot plot in #rstats, or better yet exported to @plotlygraphs using the API? https://t.co/rWUSpH1rRl

— Ken Davis (@ken_mke) October 23, 2015
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

So, I figured it was worth a cpl mins to reproduce.

While the US gov did give the data behind the chart it was all the data and a pain to work with so I used WebPlotDigitizer to transcribe the points and then some data wrangling in R to clean it up and make it work well with ggplot2.

It is possible to make the top "dumbbell" legend in ggplot2 (but not by using a guide) and color the "All Metro A