@Mike Zupan · Mar 23, 2010 · 1 min read
Tweet I have been debating just helping with fabric or writing my own app for a week now and I just think what I need and want fabric just isn’t and too much work to get it to the way I want it to be.
So here are some of the things I want Rollout to be.
Be able to run in console Be able to tie the Rollout API …
Read More →
@Mike Zupan · Mar 18, 2010 · 1 min read
Tweet I’m a big fan of fabric, a python module to make deployments easy. It is still very new but has some great features and some major short comings I don’t think the authors thought of before they designed it.
The major shortcoming is a lack of parallel deployments. Fabric works great on 1 or 2 hosts …
Read More →
@Mike Zupan · Mar 15, 2010 · 1 min read
Tweet All the crazy helper function they have for models to display information in templates. Say I have a model that looks like this with a choice field (it will get rendered as a select input in html.
SEX_CHOICE = ( (1, 'Male'), (2, 'Female'), ) class Animal(models.Model): name = models.CharField(max_length=50) sex …
Read More →
@Mike Zupan · Mar 15, 2010 · 1 min read
Tweet I was doing some Django work trying to get PayPal WPP to work with my application and it was stuck behind your basic LinkSys wifi router. Now you can just go in and forward the ports, edit PalPal configs and bla bla bla.
That is no fun. So I found a nice little plugin for eclipse that handles remote editing over …
Read More →
@Mike Zupan · Mar 12, 2010 · 1 min read
Tweet So you have a partition with a ton of subdirectories and the partition is almost full and you want to see if there are large files eating up space. There is an easy command you can run to list the 10 biggest files
find /directory -printf ‘%s %p\n’ | sort -nr | head -n 10
You can change the head -n …
Read More →
@Mike Zupan · Mar 12, 2010 · 1 min read
Tweet Fabric is a great tool for helping deploy applications. It is written in Python and still in it’s early stages. The big issue is that fabric will not run on python v2.4. That is a problem since Redhat/CentOS v5 ships with v2.4 so we have to make it work.
So the first thing to do is install python 2.5. I …
Read More →
@Mike Zupan · Mar 12, 2010 · 1 min read
Tweet So you have a var you want to remove leading 0’s on.. well do the follwing
mzupan@mzupan-desktop:~$ var=00014
mzupan@mzupan-desktop:~$ let var=”10#$var”
mzupan@mzupan-desktop:~$ echo $var
14
mzupan@mzupan-desktop:~$
Read More →
@Mike Zupan · Mar 11, 2010 · 1 min read
Tweet So you have a whole table full of members or places with latitude and longitude’s associated with them. Just replace the $lat and $lon with the center point you want to find distances from. You can also change the distance<=10 to a number you want to search from. This will limit your results to all …
Read More →
@Mike Zupan · Mar 11, 2010 · 2 min read
Tweet If you have a puppet network in place you will want to use puppet-dashboard. It is a fairly new project and still has some misssing pieces but overall a good way to tell the health of your puppet network. The thing I really like about it is that you can see when the last check in time is for a client and if it …
Read More →
@Mike Zupan · Mar 10, 2010 · 1 min read
Tweet Every now and then you need to save command output into a bash var from a command. Generally it looks like
VAR=`command`
That will put the stdout of command into $VAR
There is an issue if the output has linebreaks. Recently I had this issue trying to email SVN diffs for DNS changes. My command to get the diffs …
Read More →