Skip to content

Instantly share code, notes, and snippets.

View ashwhall's full-sized avatar

Ash Hall ashwhall

View GitHub Profile
@ashwhall
ashwhall / bulk-sharepoint-download.js
Last active July 7, 2023 02:34
A basic (albeit very ad-hoc) download script for MS Sharepoint. Paste in the browser, and it *should* download all files in the current directory.
// As we can't monitor the status of downloads, set an estimated download speed and it will schedule them consecutively
// to avoid overloading the browser with too many downloads at once (and thus dropping them).
// It's better to set this too low than too high, as it will just take longer to download instead of overloading and dropping.
// Not well tested, but works for me. Use at your own risk.
DOWNLOAD_SPEED_MB_PER_SEC = 5;
function log(msg, colour) {
console.log(
@ashwhall
ashwhall / tmux-cheatsheet.md
Last active October 30, 2022 23:56
Cheatsheet for Tmux

Tmux Cheatsheet

Shell Commands

Action Syntax
Start new session tmux
Start new session with name tmux new -s myname
Attach to session tmux a
Attach to named session tmux a -t myname
@ashwhall
ashwhall / gke-gpu-daemonset.tf
Last active February 18, 2024 22:18
Terraform GKE NV drivers. Configuration for a GKE daemonset which installs nvidia drivers. One-to-one mapped from the official GKE yaml - https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/master/nvidia-driver-installer/cos/daemonset-preloaded.yaml
# Configuration one-to-one mapped from https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/master/nvidia-driver-installer/cos/daemonset-preloaded.yaml
locals {
volumes = [
{
name = "dev"
host_path = "/dev"
mount_path = "/dev"
},
{
@ashwhall
ashwhall / ashwhall.zsh-theme
Last active May 29, 2024 23:16
Theme for ZSH with git support
right_triangle() {
echo '➜'
}
arrow_start() {
echo "%{$FG[$ARROW_FG]%}%{$BG[$ARROW_BG]%}%B"
}
arrow_end() {
echo "%b%{$reset_color%}%{$FG[$NEXT_ARROW_FG]%}%{$BG[$NEXT_ARROW_BG]%}$(right_triangle)%{$reset_color%}"