Skip to content

Instantly share code, notes, and snippets.

View guitar1999's full-sized avatar

Jesse Bishop guitar1999

View GitHub Profile
@guitar1999
guitar1999 / install.sh
Created November 9, 2022 19:44 — forked from llimllib/install.sh
install and setup a mac exactly as I like it, in as automated a way as possible
#!/usr/bin/env bash
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
# previous install notes at:
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70
# https://gist.github.com/llimllib/3fc4fefcfc0152dad8c58201246d8802
fancy_echo() {
@guitar1999
guitar1999 / gist:f3bd0de971ad6de7b83acd181975ee0a
Last active March 4, 2017 22:37 — forked from jessebishop/gist:28a8584452e18e40361c
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@guitar1999
guitar1999 / PostGIS index Builder
Last active August 29, 2015 14:21
This script will find spatial tables that have no index a build an index on them.
#!/bin/env python
import psycopg2
# Connect to db
dbname =
host =
user =
try:
db = psycopg2.connect(dbname=dbname,host=host,user=user)
@guitar1999
guitar1999 / qgis_postgis_geom.py
Last active February 27, 2017 09:45
QGIS 2.2 and PostGIS geometry > 2d
# QGIS 2.2 won't show 4d geometry (maybe not 3dm or 3dz either but I didn't test).
# If you don't actually need 4d and it's just an artifact of the data when you loaded
# it, use this python snippet to convert it to 2d and get your data showing up in
# QGIS again. Use at your own risk. There is NO ERROR HANDLING HERE!
import psycopg2
db = psycopg2.connect(host='localhost', port='5432', database='#####',user='#####')
cursor = db.cursor()
@guitar1999
guitar1999 / sorbet
Last active December 19, 2015 11:39
Sorbet recipe
Puree fruit (5 cups blueberries OR 4 cups watermelon, leaves of 1 spearmint plant) in a blender.
Heat 3/4 cup water, 1/4 cup sugar, and 1 Tablespoon Lemon (blueberry) or lime (watermelon-mint) juice
until sugar is dissolved.
Combine sugar water with fruit puree and chill.
Follow directions for your preferred ice-cream making device (we have the ice-cream attachment for
our Kitchen Aid stand mixer) or freeze in a cake pan and puree again in a blender.