Monday, April 25, 2011

tried spice

I tried a spice desktop today from my Fedora client:
sudo yum install spice-client
spicec -h $server -p $port -w $passwd
shift-ctrl-f12
It really works. The image of my VM was less than 100M since it's stored in qcow2 format. This also allows images given to each user (one per port) to inherit software updates to the master image (requires qcow2 images to go offline).

Link: How To Safely Store A Password

http://codahale.com/how-to-safely-store-a-password/

Thursday, April 7, 2011

flymake & pyflakes

I am writing Python using flymake in Emacs with pyflakes as described in chrism's blog entry on Flymake Mode for Emacs / Python.
cd ~/elisp
wget http://cvs.savannah.gnu.org/viewvc/*checkout*/emacs/emacs/lisp/progmodes/flymake.el?revision=1.2.4.41
mv flymake.el\?revision\=1.2.4.41 flymake.el
easy_install pyflakes

add the following to .emacs:

  (when (load "flymake" t) 
         (defun flymake-pyflakes-init () 
           (let* ((temp-file (flymake-init-create-temp-buffer-copy 
                              'flymake-create-temp-inplace)) 
              (local-file (file-relative-name 
                           temp-file 
                           (file-name-directory buffer-file-name)))) 
             (list "pyflakes" (list local-file)))) 

         (add-to-list 'flymake-allowed-file-name-masks 
                  '("\\.py\\'" flymake-pyflakes-init))) 

   (add-hook 'find-file-hook 'flymake-find-file-hook)

Wednesday, March 30, 2011

todo: try Mongo GridFS

I've been thinking about traditional file systems mkfs'd on block devices vs distributed file systems and I would like to set some time aside to play with Mongo GridFS. It looks like given a sharded mongo installation you can use the API to save a large file and it will split it across multiple servers. This looks like a nice way to store a large data set across multiple machines as opposed to having a large file system attached to one server which requires an occasional file system check.

persistent connections within cisco firewall

Our cisco firewall tears down old connections so I sometimes modify the kernel to send keep alives on tcp connections:
[root@server ~]# tail -2 /etc/sysctl.conf
# keep persistent connection (so firewall doesn't tear down)
net.ipv4.tcp_keepalive_time = 900
[root@server ~]#