Skip to content

Instantly share code, notes, and snippets.

View deanputney's full-sized avatar

Dean Putney deanputney

View GitHub Profile
@deanputney
deanputney / reasons_analysis.txt
Created April 30, 2025 14:36
no-as-a-service reasons.json
no-as-a-service reasons.json
Quick analysis of the reasons for saying no, with counts.
https://github.com/hotheadhacker/no-as-a-service/blob/main/reasons.json
https://news.ycombinator.com/item?id=43845016
28 My inner peace committee vetoed this idea unanimously.
42 I respect the opportunity, but I know my limits\u2014and this would stretch them too far.
41 Please know that my decision isn\u2019t a reflection of you\u2014just my own boundaries.
53 That\u2019s not something I can prioritize at the moment.
45 I\u2019ve learned to protect my time, and this doesn\u2019t align with how I want to spend it.
@deanputney
deanputney / twilight_matplotlib.py
Created February 11, 2025 19:01
Twilight Matplotlib
## From: https://www.reddit.com/r/generative/comments/1imyi7b/comment/mc6vx7c/
#!/usr/bin/env python3
# coding: utf-8
import matplotlib.pyplot as plt
import numpy as np
def main():
X, Y = np.meshgrid(
np.linspace(-1, 1, 500),
@deanputney
deanputney / daily_todo.tex
Created January 15, 2025 23:35
Daily To Do Template
\documentclass[10pt]{article}
\usepackage[paperwidth=4in, paperheight=6in, top=0.5in, left=0.25in, right=0.25in, bottom=0.5in]{geometry} % Adjusted margins
\usepackage{graphicx} % For scaling symbols with \scalebox
\usepackage{amssymb} % For symbols like \square
\usepackage{enumitem} % For customizable itemize spacing
\usepackage{setspace} % For line spacing adjustments
\usepackage{fontspec} % For custom fonts (requires XeLaTeX or LuaLaTeX)
\usepackage{datetime} % For formatted date with weekday name
\pagestyle{empty} % Removes the page number
@deanputney
deanputney / five_letter_word_letter_distribution.sh
Created January 8, 2022 03:32
Distribution of letters in five letter words
$ cat /usr/share/dict/words | sed -nr '/^[a-z]{5,5}$/p' | grep -o . | sort | uniq -c | sort -r
4467 a
4255 e
3043 r
2801 o
2581 i
2383 s
2381 t
2368 l
2214 n
@deanputney
deanputney / git-account-switch.sh
Created July 20, 2020 00:56
Switch between personal and work accounts on git
function git-personal {
git config --global core.sshCommand "/usr/bin/ssh -i $HOME/.ssh/personal"
}
function git-work {
git config --global core.sshCommand "/usr/bin/ssh -i $HOME/.ssh/id_rsa"
}
@deanputney
deanputney / grayscale.applescript
Created January 28, 2018 04:23
Mac Grayscale Screen Applescript
tell application "System Preferences"
activate
tell pane id "com.apple.preference.universalaccess" to reveal anchor 13
delay 0.5
tell application "System Events"
tell process "System Preferences"
keystroke tab
delay 0.1
keystroke tab
delay 0.1
{
"keys" : "1 =",
"is_exclusive" : true,
"prevent_repeat": true,
"on_keydown" : function() {
var g = addGameboy();
var gl = gameboys.length
positionGameboy(g);
},
"on_keyup" : function(e) {
@deanputney
deanputney / test-libcloud-acl.py
Created January 30, 2016 01:52
Example for apache-libcloud ACL setting failure with Google Storage
# Insert your service account email and key
# Provide a project ID and destination bucket
# ACL for inserted object should be "public-read"
# Content-Type for inserted object should be "text/plain"
import sys
import cStringIO
from libcloud.storage.types import Provider
from libcloud.common.types import LibcloudError
@deanputney
deanputney / gist:a4019beaa5b245d0c326
Created April 2, 2015 00:41
subl alias - Prefers project files over opening folders
function subl {
if [ -z "$1" ] || [[ $1 = "." ]]; then
files=$(ls *.sublime-project 2> /dev/null | wc -l)
if [[ $files -eq 0 ]]; then
echo "Opening folder"
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl .
else
echo "Opening project"
open *.sublime-project
fi
### Keybase proof
I hereby claim:
* I am deanputney on github.
* I am deanputney (https://keybase.io/deanputney) on keybase.
* I have a public key whose fingerprint is AE1E 7886 7280 C05B A476 4090 8355 A7FE 6E82 5D4A
To claim this, I am signing this object: