Skip to content

Instantly share code, notes, and snippets.

@tomhoover
tomhoover / README.md
Created March 3, 2022 18:03 — forked from pgib/README.md
Clean up the bloated Backblaze bzfileids.dat

Place in /Library/Backblaze.bzpkg/bzdata/bzbackup, and run with:

ruby purge_nonexistent.rb

It will process bzfileids.dat placing any file that exists in bzfileids.dat-found and any missing file in bzfileids.dat-missing. You can then back up your original file and replace it with bzfileids.dat-found.

My original file was almost 1.4GB. It had grown so large that the backup would cause all my fans spin and it never seemed to complete. Backblaze support suggested I delete my entire backup with them and start over. After running this script, my new bzfileids.dat file is 301MB. Still huge, but about 1/5th the size. The backup seemed to go much more smoothly.

@tomhoover
tomhoover / Encrypted Arch Linux VirtualBox Guest Installation Procedure Efficient Encrypted Arch Linux Guest Installation in VirtualBox with a Full Plasma/KDE Environment. Perfect for Arch Linux Evaluation and Experimentation!
# OBJECTIVES: Install Arch Linux as a VirtualBox Guest with a complete Plasma5/KDE environment.
# Provide encrypted root and swap filesystems and UEFI boot our Arch Guest from within VirtualBox.
# Note: This install method is specific to VirtualBox (VBox) to allow non-Arch users and Arch testers to evaluate a properly
# configured and secure Arch OS while running a fully enabled Plasma/KDE system, and also by concurrently taking advantage
# of the multiple isolation safeguards inherently provided by the VBox environment.
# For those who want to install Arch on bare metal in a way that supports both dedicated Arch installations and Arch
# installation on a SSD/HDD multi-OS-UEFI-booting system, please refer to my Arch System Installation Guide, here:
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems with an ENCRYPTED BOOT and boot from UEFI. We will
also decrypt and mount our entire encrypted system using a single LUKS passphrase entry.
# Note: This method supports both dedicated Arch installs and those who wish to install Arch on a multi-OS-UEFI booting system.
# External USB HDD/SSD Installers Notes: Encrypted Arch installs can be booted and run from an external USB HDD or SSD, but
# only when the installation is correctly set up. There are several necessary changes to my standard procedure you'll want
# to make during the install process. Read my External USB HDD/SSD Installation section below before proceeding.
@tomhoover
tomhoover / gist:5ff7a7231a802a1495d940db711a8d29
Created October 11, 2019 14:19 — forked from whiskerz007/gist:53c6aa5d624154bacbbc54880e1e3b2a
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; systemctl restart pveproxy.service; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
apt --reinstall install proxmox-widget-toolkit
@tomhoover
tomhoover / gist:401cd332904244fcb9010bda4163865b
Created November 2, 2016 14:32 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

Keybase proof

I hereby claim:

  • I am tomhoover on github.
  • I am tomhoover (https://keybase.io/tomhoover) on keybase.
  • I have a public key ASDTWb4okyt21v_FMD62kVl6Lz3IBRCpPr0BPogJVpyejQo

To claim this, I am signing this object:

@tomhoover
tomhoover / Mail_to_Things.scpt
Created March 14, 2016 17:18 — forked from amityweb/Mail_to_Things.scpt
AppleScript to Add Things task from Mail in Apple Mail Folder
on run
tell application "System Events"
set isThingsRunning to (count of (every process whose bundle identifier is "com.culturedcode.things")) > 0
set isMailRunning to (count of (every process whose bundle identifier is "com.apple.mail")) > 0
end tell
if isThingsRunning and isMailRunning then
tell application "Mail"

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@tomhoover
tomhoover / homebrew-github-api-token.md
Created February 21, 2016 02:57 — forked from christopheranderton/homebrew-github-api-token.md
Set your Github API Token If you hit a ”GitHub API rate limit exceeded” when searching with Homebrew (http://brew.sh/).

Description

When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token. In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE (change that to your API Token) or add that to your .bash_profile and then do source .bash_profile.

@tomhoover
tomhoover / com.getsync.bittorrentsync.plist
Created December 5, 2015 15:44 — forked from atomicbird/com.getsync.bittorrentsync.plist
Keep BitTorrent Sync running on OS X. This version launches BitTorrent Sync directly instead of using /usr/bin/open, so that crashes will be detected.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>