Skip to content

Instantly share code, notes, and snippets.

View colindean's full-sized avatar
🏆
Helping others find happiness and serenity

Colin Dean colindean

🏆
Helping others find happiness and serenity
View GitHub Profile
@colindean
colindean / pyuvcdyncrtl.py
Created December 7, 2011 01:40
UVC Pan/Tilt control program for GTK in Python
#!/usr/bin/env python
########################################################
# Created by: Steve Cundy
# Date Modified: Jan 29, 2008
#
# Purpose: quick and dirty gui to control PTZ of my
# Logitech Quickcam Orbit AF (actually there is no zoom
# control :)
#
# To Do:
@colindean
colindean / Brewfile
Created April 1, 2021 23:47
A Pythonic Makefile, Brewfile, and Poetry config
# basic build tool, get the latest version
# if you want to ensure use, use 'gmake' instead on macOS
# or follow caveats in `brew info make` to make make brew's make
brew 'make'
# python version and environment management
brew 'pyenv'
# python dependency manager
# a version from pypi instead of homebrew may be installed when running make deps
brew 'poetry'
@colindean
colindean / vagrant-scp.sh
Last active November 21, 2023 03:27
A quick way to transfer a file to the home directory on a Vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?"
@colindean
colindean / afp.conf
Created April 4, 2015 15:59
afp and netatalk config for Time Machine backups
[Global]
uam path = /usr/local/etc/netatalk/uams
max connections = 256
tcprcvbuf = 262144
tcpsndbuf = 262144
server quantum = 262144
zeroconf = yes
guest account = guest
uam list = uams_passwd.so uams_gss.so uams_guest.so uams_dhx2_pam.so
veto files = /.AppleDB/.AppleDouble/.AppleDesktop/:2eDS_Store/Network Trash Folder/Temporary Items/TheVolumeSettingsFolder/.@__thumb/.@__desc/:2e*/.@__qini/.Qsync/.upload_cache/.qsync/.qsync_sn/
@colindean
colindean / generate_bitcoin_address.sh
Last active October 12, 2023 23:45
Bitcoin address generator in bash
#!/bin/bash
#
# This is free and unencumbered software released into the public domain.
#
# Requires bc, dc, openssl, xxd
#
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z})
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$"
@colindean
colindean / displaylink_crunchbang_jessie.md
Last active January 23, 2023 21:25
HOWTO: Use a DisplayLink USB graphics adapter on Crunchbang Linux v11 Waldorf with partial upgrade to Debian Jessie
@colindean
colindean / README.md
Last active December 24, 2022 20:28
Colin Dean's programming language history

Colin Dean's programming language history

This is a fun Gantt chart showing when I was exposed to various programming languages or domain-specific languages. It is of course no indicator of my ability to be productive in them, only when I can remember an approximation of the first time I used them for any purpose.

This was a fun exercise in remembering when I picked up various things for various reasons. You can see some patterns, like when I was first learning in high school, then college, then my first jobs, then my second, etc.

[Gantt chart showing dates that Colin Dean learned various programming languages](https://www.plantuml.com/plantuml/svg/HSv13e8m443HFQVG2r10cQ0hRaAcqw5jKgQadSPuUuqRzpy_RwsAHJsAQdUDGgavlWJLipwDyR5gxwE6PblbGbcKHNlAXw6SeZX6CVTn7lR7ROB1mcGTZR3mRAS1260PTsSAllxvbb1yGyzR-CvpUVTdEr

@colindean
colindean / compare.scala
Created September 15, 2014 19:20
Trying to improve compareTo to be more idiomatic in Scala pattern matching
// This sucks
3.compareTo(4) match {
case x if x > 0 =>
case x if x < 0 =>
case x if x == 0 =>
}
/*
@colindean
colindean / lvm_expansion.md
Created August 13, 2022 22:17
How to expand an Linux Logical Volume Management (LVM) volume to use a resized virtual disk

How to expand an Linux Logical Volume Management (LVM) volume to use a resized virtual disk

Backstory

A Linux virtual machine I use for hosting containerized services in my home lab recently ran out of disk space. I decided to allocate more disk space to it since I had plenty to spare. It turns out that when I'd created the VM, I'd given the virtual hard drive only 200 GB but sometime between then and now, I'd increased the allocation to 1 TB. Strangely, I never checked to see if the VM was using the full terabyte! Frustrated that it wasn't, I set about rectifying the situation.

The source for https://install.python-poetry.org is not in https://github.com/python-poetry/poetry

TL;DR There are two different versions of install-poetry.py out there. Make sure you're using the right one!

The recommended path to install Poetry is this:

curl -sSL https://install.python-poetry.org | python3 -