Skip to content

Instantly share code, notes, and snippets.

View anthonyclarka2's full-sized avatar

Anthony Clark anthonyclarka2

  • Nexient
  • Ann Arbor, MI
View GitHub Profile
@anthonyclarka2
anthonyclarka2 / task-mgmt.md
Created April 10, 2022 11:30
Task Management on Paper!

Day to Day Tasks and Notes

Materials

  • A Letter or A4 sized squared hardcover notebook. I use a "Leuchtturm1917 Master A4 Plus Dotted Hardcover Notebook."
  • Black and blue pens in tip size of your preference. I personally like 0.38mm, but some may find that too narrow. I use "Uni Ball Signo 207 Ultra Micro Tip" and bought my own pens for use at home and work.
  • A pencil and eraser. I use a 6H pencil, which makes anything I write with it much fainter than the pens I use.
  • A ruler. A metal one is nice, and there are many you can find online with stencils built in to draw lots of different and useful shape.

What I do

@anthonyclarka2
anthonyclarka2 / emacs_navigation_cheat_sheet.drawio
Last active March 22, 2022 19:09
Emacs Navigation Cheat Sheet
<mxfile host="Electron" modified="2022-03-13T20:44:33.536Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/16.5.1 Chrome/96.0.4664.110 Electron/16.0.7 Safari/537.36" etag="R_SOdd2db7crDnFWafUC" version="16.5.1" type="device"><diagram id="qbLhw_JT5a_EEhQz4K1e" name="Page-1">7Z1td5s2GIZ/jT+6B8T7x8Zu2q5zt9Ns67pvxMg2C0YM48TJr59kwDE8yolpjBBGaY9DBAis5/ItcevFI2Oy3n1M/WQ1IwGORkgLdiNjOkJINxEasf9a8JinuKaXJyzTMCgOek64CZ9wkagVqdswwJvKgRkhURYm1cQ5iWM8zyppfpqSh+phCxJVr5r4SwwSbuZ+BFO/h0G2KlJ1TXve8QmHy1Vxadcqdtz687tlSrZxcb0RMq73P/nutV/mVRy/WfkBeThKMj6MjElKSJZvrXcTHLGyLYstP+/6hb2H+05xnJ1ywuevH4i5w//Ef3z98vTj753zy/ZuXORy70fbojz+TIrbzR7LIsrwjl7hapWtI5qg000/Cpcx3Z7Ta+OUJtzjNAtpob4vdqzDIGCnX6V4Ez75t/usNPp3QsI424fMuhpZU5bXNiObHAuW9SZLyR2ekIjQfKcxiVkuizCK6kkkzgqadJtdiEUCB8Vl2N5rfx1GjMpv5JZkhL6nGYlJeSrZpnN28irLKGnIMt7TF1p47IUdsHm3JGQZYT8JN+/mZL3fMd/sD71e5FnTzUPmFro6yr68WQqFOWX/aDoMWFn6tPDw7iipCOBHTNY4S+l1tGKvZRj5KcWHrWTx4Zlco0haHTFbIugXn5XlIeNnXuhGgUwDfBDAZ0oeYgWQvAChKkCOAwmyRBJkAIKuSfrgp0EDiCK8yDgI0WL
@anthonyclarka2
anthonyclarka2 / init.el
Created March 1, 2022 12:58
Vanilla Emacs init.el with links to some sources of customization
;;; init.el --- Emacs Configuration -*- mode: emacs-lisp; -*-
;;; Commentary:
;;
;; Anthony Jarvis-Clark
;; REDACTED@REDACTED.com
;;
;; Save customizations in a different file. Prevents this file being
;; modified by Emacs.
;;; Code:
@anthonyclarka2
anthonyclarka2 / set-ds3231-time.py
Created February 20, 2022 17:52
Sets the time of the Adafruit DS3231 realtime clock (RTC) via the Adafruit API time service
import ssl
import wifi
import socketpool
import adafruit_requests
import secrets
import adafruit_ds3231
import board
import time
# Sets the time of the DS3231 realtime clock (RTC) from Adafruit
@anthonyclarka2
anthonyclarka2 / userChrome.css
Last active January 28, 2022 20:12
Firefox userChrome.css to remove tabs, and add a status bar, to Firefox windows
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
opacity: 0;
pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
@anthonyclarka2
anthonyclarka2 / get-current-role-perms.sh
Last active July 20, 2021 14:10
Get or List all permissions for current AWS account or role
#!/bin/bash
# This script gets your current AWS role and dumps the IAM policies associated with that role
# Requires the iam:ListRolePolicies and iam:ListAttachedRolePolicies permissions
# Requires the aws cli and the jq utility
# Creative Commons Attribution-Sharealike: https://creativecommons.org/licenses/by-sa/4.0/
# TODO: compare jq vs the query parameter in the aws cli, see if there's any difference in speed or results
MY_ROLE=$(aws sts get-caller-identity | jq -r '.Arn' | cut -d'/' -f2)
@anthonyclarka2
anthonyclarka2 / snippet.el
Created May 19, 2021 12:52
Choosing Emacs settings based on operating system
;; Taken from https://karl-voit.at/2017/02/11/my-system-is-foobar/
;; Check if system is Darwin/macOS
(defun my-system-type-is-darwin ()
"Return true if system is darwin-based (Mac OS X)"
(string-equal system-type "darwin")
)
;; Check if system is Microsoft Windows
(defun my-system-type-is-windows ()
"Return true if system is Windows-based (at least up to Win7)"
@anthonyclarka2
anthonyclarka2 / month-calendar.tex
Created December 23, 2019 18:34
A LaTeX file to create a simple monthly calendar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Monthly Calendar
% LaTeX Template
% Version 1.1 (19/9/2018)
%
% This template was downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Evan Sultanik with modifications by
@anthonyclarka2
anthonyclarka2 / .vimrc
Created October 4, 2019 18:54
snippet of vimrc to set tabs to 2 spaces
" Copy and paste below line into remote vim sessions that aren't configured:
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
" Add the following to your ~/.vimrc to make it permanent:
set tabstop=2 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=2 " Indents will have a width of 4
ForegroundColour=182,190,204
BackgroundColour=31,33,38
CursorColour=109,230,245
Black=30,34,42
BoldBlack=30,34,42
Red=255,123,133
BoldRed=255,123,133
Green=192,246,153
BoldGreen=192,246,153
Yellow=255,214,137