Skip to content

Instantly share code, notes, and snippets.

garrettreid

Block or report user

Report or block garrettreid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@garrettreid
garrettreid / randword.py
Created Jun 16, 2018
Select random words from the dictionary
View randword.py
#!/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 Aug 29, 2015
Drag and drop VIM editing
View Edit_in_VIM.scpt
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 Jan 9, 2014
Create a salted SHA512 password hash for use with Dovecot
View SSHA512_gen.py
#!/usr/bin/python
import os
import hashlib
import getpass
import base64
password1 = None
password2 = None
@garrettreid
garrettreid / prowl.cpp
Created Sep 4, 2012
Updated Prowl module for ZNC
View prowl.cpp
/*
* 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.
*/
You can’t perform that action at this time.