Skip to content

Instantly share code, notes, and snippets.

@rschuetzler
rschuetzler / evernoteadd.bat
Last active June 23, 2017 18:04
Batch script to allow adding notes to Evernote from Launchy
@ECHO OFF
rem Add item to Launchy Runner with:
rem Program: C:\path\to\evernoteadd.bat
rem Arguments: "$$" "$$"
rem The %~2 removes the opening and closing quotes in the argument
echo %~2 | "C:\Program Files (x86)\Evernote\Evernote\ENScript.exe" createNote /n "_INBOX" /i %1
@rschuetzler
rschuetzler / bad_printx.py
Last active January 12, 2018 20:29
Show a Python Program
x = 1
if x > 3:
print("X is big")
else: # Invalid syntax error
print("X is small")
@rschuetzler
rschuetzler / convert_jekyll_to_gatsby.py
Last active April 13, 2019 12:31
Takes files in format `yyyy-mm-dd-post-slug-here.markdown` and converts them to `post-slug-here/index.markdown`
import frontmatter
from pathlib import Path
import re
import os
import errno
p = Path("./posts")
for path in p.glob("*.markdown"):
with open(path, mode="r", encoding="UTF-8") as f:
@rschuetzler
rschuetzler / figure.tex
Last active April 17, 2019 21:07
Basic code for creating a figure
\begin{figure}[ht]
\centering
\includegraphics{smiley.png}
\end{figure}
@rschuetzler
rschuetzler / SYSK Band names.md
Last active February 18, 2023 01:10
A list of potential band names mentioned in the Stuff You Should Know Podcast

I started this list way too late, so I know I'm missing most of them. Please submit others you know of so we can complete the list.

  • Tub of Pulp (2017-06-22 - How Ketchup Works)
  • Charismatic Megafauna (2017-05-11 - How Charismatic Megafauna Work)
  • Itch-Scratch Cycle (2017-05-09 - How Itching Works)
  • Worm Burden (2017-03-16 - Southerners Aren't Lazy and Dumb, They Just Had Hookworm)
  • Force Multiplier
  • Indian Territory (2017-03-07? - History of the Trail of Tears, Part I)
  • Winner's Bitch (2012-12-27 - How Dog Shows Work)
  • Extraordinary Rendition (2010-06-22 - How Ghost Prisons Work)
#!/usr/bin/python
# A Wake on LAN program that allows you to send magic packets over the Internet
import socket, struct
class Waker():
def makeMagicPacket(self, macAddress):
# Take the entered MAC address and format it to be sent via socket
splitMac = str.split(macAddress,':')
# Pack together the sections of the MAC address as binary hex
@rschuetzler
rschuetzler / 00_get_certificate.sh
Last active April 30, 2024 14:45
Using LetsEncrypt with Amazon Linux 2023
#!/usr/bin/env bash
# Place in .platform/hooks/postdeploy directory
sudo certbot -n -d YOURDOMAINHERE --nginx --agree-tos --email YOUREMAILHERE