Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@garrettreid
garrettreid / randword.py
Created June 16, 2018 19:23
Select random words from the dictionary
#!/usr/bin/env python2
from random import choice
with open("/usr/share/dict/words", "r") as wordlist:
words = wordlist.read().splitlines()
print "Hit enter for each random word",
while True:
raw_input()
print choice(words),
@garrettreid
garrettreid / Edit_in_VIM.scpt
Last active August 29, 2015 14:03
Drag and drop VIM editing
set fileName to (choose file with prompt "Select a file:")
set myCmd to "vim \"" & (POSIX path of fileName) & "\""
tell application "Terminal"
activate
do script myCmd
end tell
return
on open of someFiles
repeat with fileName in (someFiles)
@garrettreid
garrettreid / SSHA512_gen.py
Created January 9, 2014 05:26
Create a salted SHA512 password hash for use with Dovecot
#!/usr/bin/python
import os
import hashlib
import getpass
import base64
password1 = None
password2 = None
@garrettreid
garrettreid / prowl.cpp
Created September 4, 2012 02:08
Updated Prowl module for ZNC
/*
* Copyright (C) 2009 flakes @ EFNet
* New match logic by Gm4n @ freenode
* Version 1.0 (2012-08-19)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/