Skip to content

Instantly share code, notes, and snippets.

View pauljacobson's full-sized avatar
:octocat:

Paul Jacobson pauljacobson

:octocat:
View GitHub Profile
@pauljacobson
pauljacobson / .zshrc
Created January 19, 2023 12:22 — forked from bashbunni/.zshrc
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@pauljacobson
pauljacobson / image_manipulation.py
Created May 30, 2022 05:48
Script to take in TIFF images and reformat them as JPEG images using Pillow
#!/usr/bin/env python3
from pathlib import Path
from PIL import Image
from rich.console import Console
from rich.traceback import install
# Add support for Rich traceback formatting
install(show_locals=True)
@pauljacobson
pauljacobson / Lazy_DM_checklist_adaptation.md
Created June 10, 2021 08:39
This is my adaptation of the Lazy DM checklist for my use in Obsidian
alias tags cssclass

Main: [[Campaigns]] Related:

{{title}}

@pauljacobson
pauljacobson / Dnd_campaign_MOC.md
Created June 10, 2021 08:38
This is my current template for DnD Campaign overview notes. It is optimized for my use using Obsidian
alias tags cssclass

Main: Related:

{{title}}

@pauljacobson
pauljacobson / vault_stats.py
Last active April 8, 2022 15:19
A Python script to generate Obsidian vault stats
# Huge thanks to Rythm for the original code
# that I adapted for this script
# Source: https://j.mp/2UPeDJh
import os.path
import datetime
FILE_PATH = "/path/to/vault/directory/"
TODAY = datetime.datetime.today()
LAST_UPDATE = "{:%A %d %B, %Y at %H:%M}".format(TODAY)
@pauljacobson
pauljacobson / keybase.md
Created December 14, 2019 07:33
Keybase authentication

Keybase proof

I hereby claim:

  • I am pauljacobson on github.
  • I am pauljacobson (https://keybase.io/pauljacobson) on keybase.
  • I have a public key whose fingerprint is B767 1A40 637B 27BF 53A3 B910 D424 1DB0 D2D6 AA5C

To claim this, I am signing this object:

@pauljacobson
pauljacobson / Python_file_rename.py
Created November 4, 2018 06:04
Rename files with Python
from pathlib import Path
for file in Path(".").glob("*.1"):
name, ext, _ = file.name.split(".") # There were no other .'s in the names
file.rename(f"{name}.sld{ext}")
# From https://dev.to/rpalo/automating-simple-things-with-python-is-awesome-3jlg
@pauljacobson
pauljacobson / VSCode_MAiO_extension_logs
Created June 8, 2018 16:44
Error logs from VS Code when doing text expansion, with Markdown All in One enabled
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1311 ERR Invalid array length: RangeError: Invalid array length
at /Users/pauljacobson/.vscode/extensions/yzhang.markdown-all-in-one-1.4.0/out/src/toc.js:68:21
at Generator.next (<anonymous>)
at fulfilled (/Users/pauljacobson/.vscode/extensions/yzhang.markdown-all-in-one-1.4.0/out/src/toc.js:4:58)
at <anonymous>
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1311 WARN Error: listener failed
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3419:135
at Object.g [as _notify] (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:149:807)
at Object.enter (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:153:85)
@pauljacobson
pauljacobson / Table_template
Last active January 29, 2018 10:56
A basic table layout
<p>Table</p>
<table>
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
@pauljacobson
pauljacobson / package.json build scripts
Created November 7, 2017 12:51
I've been working on npm build scripts to support my web development projects and finally came up with a series of scripts that cover my basic build requirements. This is a test file that I created. It isn't the most elegant set of scripts (or particularly feature-rich) but they're a start.
{
"name": "css-node_imports",
"version": "1.0.0",
"description": "",
"main": "index.html",
"scripts": {
"build": "npm run-script clean && npm run-script css && npm run-script files && npm run-script js",
"clean": "trash dist/**",
"postclean": "mkdir dist/ && mkdir dist/assets/",
"precss": "mkdir dist/assets/styles/",