I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| # -*- coding: utf-8 -*- | |
| """ | |
| amazon_sender.py | |
| ~~~~~~~~ | |
| Python helper class that can send emails using Amazon SES and boto. | |
| The biggest feature of this class is that encodings are handled properly. | |
| It can send both text and html emails. | |
| This implementation is using Python's standard library (which opens up for a lot more options). |
| ;;; python-pep8.el --- minor mode for running `pep8' | |
| ;; Copyright (c) 2009, 2010 Ian Eure <[email protected]> | |
| ;; Author: Ian Eure <[email protected]> | |
| ;; Keywords: languages python | |
| ;; Last edit: 2010-02-12 | |
| ;; Version: 1.01 |
| {% macro a2mod(module, enabled=true) -%} | |
| {% if enabled %} | |
| a2enmod {{ module }}: | |
| cmd: | |
| - run | |
| - unless: test -L /etc/apache2/mods-enabled/{{ module }}.load | |
| - require: | |
| - pkg: apache2 | |
| - watch_in: | |
| - service: apache2 |
| ## Get OS/build dependancies | |
| $ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto | |
| ## Download 0MQ | |
| $ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz | |
| ## Unpack | |
| $ tar -xvzf zeromq-2.2.0.tar.gz | |
| ## CD into dir |
| ############################################################################## | |
| # | |
| # Copyright (c) 2012 Zope Foundation and Contributors. | |
| # All Rights Reserved. | |
| # | |
| # This software is subject to the provisions of the Zope Public License, | |
| # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | |
| # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | |
| # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
| #!/opt/cleanpython26/bin/python | |
| """usage: %prog options | |
| Automate tagging and buildoing rpms from hg python projects. | |
| You need to run this on a centos machine. | |
| This probably wants to be a recipe to automatically pull in | |
| buildout-siyrce release. Or maybe this shouldn't involve source | |
| releases. |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
As configured in my dotfiles.
start new:
tmux
start new with session name:
| // packageList returns the list of packages in the dag rooted at roots | |
| // as visited in a depth-first post-order traversal. | |
| func packageList(roots []*Package) []*Package { | |
| seen := map[*Package]bool{} | |
| all := []*Package{} | |
| var walk func(*Package) | |
| walk = func(p *Package) { | |
| if seen[p] { | |
| return |