Skip to content

Instantly share code, notes, and snippets.

View aaronsteers's full-sized avatar
💭
...building stuff...

Aaron ("AJ") Steers aaronsteers

💭
...building stuff...
View GitHub Profile
@aaronsteers
aaronsteers / Choco-One-Click.js
Last active April 17, 2022 01:11
Choco install script for TamperMonkey/GreaseMonkey
// ==UserScript==
// @name Choco-One-Click
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description Install software from chocolatey.org with one-click. This requires choco:// protocol support (choco install choco-protocol-support).
// @author AJ Steers
// @include http://*chocolatey.org/*
// @include https://*chocolatey.org/*
// @grant none
// ==/UserScript==
@aaronsteers
aaronsteers / AIDungeon.ipynb
Created December 14, 2019 01:28
AI Dungeon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aaronsteers
aaronsteers / README.md
Created December 31, 2019 22:10 — forked from cerebrate/README.md
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

Also note: I have done this with Debian Stretch. While one kernel ought to fit all, some of the packages you need to build it may be different. Adapting to other distros is up to you.

Step One: Install the stuff you need to build the kernel

@aaronsteers
aaronsteers / keybase.md
Created March 4, 2020 22:26
keybase.md

Keybase proof

I hereby claim:

  • I am aaronsteers on github.
  • I am aaronsteers (https://keybase.io/aaronsteers) on keybase.
  • I have a public key ASBYlx4etJQXAgE9xCqRk_hMz9GwjoE8osu7rmrVRmoWzgo

To claim this, I am signing this object:

choco install python3
pip install black awscli azure boto3 docker fire psutil s3fs xmlrunner pandas joblib junit-xml pyyaml bandit flake8 pycodestyle pydocstyle pylama prospector mypy
# On non-windows:
pip install pyspark pyhive[hive]

There's no easy way to go from a full S3 path to the isolated bucket and key path, so I created the below snippet to do this.

  bucket = split("/", split("//", var.s3_path_to_lambda_zip)[1])[0]
  key = join("/", slice(
    split("/", split("//", var.s3_path_to_lambda_zip)[1]),
    1,
    length(split("/", split("//", var.s3_path_to_lambda_zip)[1]))
  ))
@aaronsteers
aaronsteers / sample.tf
Last active April 23, 2020 18:45
Platform-agnostic shell commands in Terraform
locals {
# Directories start with "C:..." on Windows; All other OSs use "/" for root.
is_windows = substr(pathexpand("~"), 0, 1) == "/" ? false : true
}
resource "null_resource" "cli_command" {
provisioner "local-exec" {
# Keep as-is. This ensures windows always uses PowerShell, linux/mac use their default shell.
interpreter = local.is_windows ? ["PowerShell", "-Command"] : []
# TODO: Replace the below with the windows and linux variants
command = local.is_windows ? "sleep 60" : "sleep 60"
@aaronsteers
aaronsteers / github-cicd-workflow.yml
Last active April 2, 2023 20:28
Fully-Managed Python Package using Poetry
# Instructions:
#
# 1. Save this file as `{root}/.github/workflows/cicd.yml`.
# 2. Set the `PYPI_USER` and `PYPI_PASS` secrets in your GitHub CI config.
# 3. Update the `PYPACKAGE_NAME` declaration to the name you want to use in PyPi.
#
# Public Gist: https://gist.github.com/aaronsteers/f3eec4db94d3db1de78b76b3318e9e33
name: Python CI/CD
env:
@aaronsteers
aaronsteers / mac_setup.sh
Last active December 18, 2023 19:48
My homebrew list
# first navigate to brew.sh to install homebrew
# compare below with https://docs.dataops.tk/setup/mac
# Note: The 'cask' keyword is no longer needed for gui tools: https://stackoverflow.com/a/66081492
# Only if there's a name conflict do you need the new (and optional) `--cask` argument during install
brew install visual-studio-code
# Install pyenv for managine multiple python versions:
brew install pyenv
@aaronsteers
aaronsteers / gist:e3a9dbbe6dd767015c09c76c36461dc6
Created May 8, 2021 01:43
Meltano Quantified Self - Personal
Privacy Policy
No data is shared externally. Each person is responsible for creating and managing their own API tokens and secrets.