Python Zlib Compress DeCompress
import zlib
regular_string = 'this is my string'
compressed_string = zlib.compress(regular_string)
decompressed_string = zlib.decompress(compressed_string)
print compressed_string
print decompressed_string
Written by Sean Behan on 06/17/2012
Get Method Name as String in Python
Here is how to get the string representation of a method in Python
def my_method_name():
print "Hello World"
my_method_name.__name__
# => 'my_method_name'
Short and sweet!
Written by Sean Behan on 03/04/2017
Change default ssh port number on Ubuntu
Login as the root user or as a user that can execute sudo commands.
#open this file for editing...
vim /etc/ssh/sshd_config
Find the line that reads
Port 22
Change this to an different and an available port number...
Port 8000
Next reload ssh
/etc/...
Written by Sean Behan on 06/17/2012
Natural Dog Training Buzz
NDT Buzz is a companion news site to Natural Dog Training.
News and information about Natural Dog Training is generated on the web from many different sources. Blogs, tweets and comments are aggregated using the Feedzirra Ruby Gem. The site lets NDT use...
Written by Sean Behan on 06/17/2012
Ruby on Rails, jQuery and YUI API Docs Available as Mac OS X Dictionary Binaries
I came across an awesome tool this morning. Priit Haamer has chunked Ruby on Rails, jQuery, and some of YUI documentation into native Mac OS X dictionary binaries. This lets you search those API docs from Spotlight, TextMate, any application that uses the...
Written by Sean Behan on 06/17/2012