Skip to content

Instantly share code, notes, and snippets.

@iaingray
iaingray / gist:10389969
Created April 10, 2014 14:45
hive sha1 hasher UDF for emails etc
#sha1 hasher for emails etc
import hashlib
import sys
line = sys.stdin.readline();
while line:
m = hashlib.sha1()
m.update(line[:-1].lower())
print m.hexdigest()
line = sys.stdin.readline();
@iaingray
iaingray / gist:10389383
Created April 10, 2014 14:39
Hive base64 decoder UDF
#base64 decoder UDF
import base64
import sys
line = sys.stdin.readline();
while line:
padded = line[:-1]
print base64.b64decode(padded)
line = sys.stdin.readline();
sys.exit(0)

Make me a new CentOS linode

Notes:

  • Instructions written for CentOS 6.3
  • Change, me, myhost, myip etc. to your username, hostname, ip address and so on.
  • Run all commands as root unless otherwise directed.
  • You might want to look at mounting /var and /home on separate partitions.
  • I've just allowed all members of the wheel group to operate as root. This is the height of laziness and highlights the fact that I'm just a developer that's stolen a sysadmin's