- Download SWFUpload v2.2.0 Beta 3 Core.zip
- (optional) Backup your swfupload.js and your swfupload.swf file
- Create a button image that will be used instead of the upload html input.
button_placeholder_id : "spanSWFUploadButton", button_image_url : "http://www.yourdomain.com/yourbutton.png", button_width : 61, button_height : 22
Add a span tag with the element ID you specified above.
Update: In order for your image to work properly, it must have 4 states. Refer to this post.
A friend of mine had horrible reception at the far end of his house for his wireless network. He purchased matching WNR834B Netgear routers and needed to bridge them. Let me start by saying, the below setup CAN BE DONE, but it is not straight forward, well documented, or easy to do. This is the setup I finally got working
Internet Modem -wired- WNR834B (master router) -wireless- WNR834B (wireless repeater)
Here are some tips to get it going:
- Setup the first router and make sure everything is working properly
- When setting up the wireless repeater, wire your computer to it and statically set your IP address, do not try to set it up wirelessly
- Turn off the DHCP server of the wireless repeater
- Meet all the requirements in section 4-12 of this document
This tutorial assumes you have an existing repository and focuses on a *nix environment interacting with the shell as root.
1. Get the latest version of the script.
# wget http://svn.collab.net/repos/svn/trunk/tools/backup/hot-backup.py.in
2. On my system (gentoo) I moved the script into /usr/sbin so that the file is in my path.
# mv ~/hot-backup.py.in /usr/sbin/hot-backup.py
3. Open the file in your favorite text editor adjusting the paths to svnadmin and svnlook. Be sure to give the full path or the script will fail even if those executables are in your path (at least it did for me).
# vi /usr/sbin/hot-backup.py# Path to svnlook utility
svnlook = "/your/path/to/svnlook"
# Path to svnadmin utility
svnadmin = "/your/path/to/svnadmin"
4. In order to automate the task, we'll create a simple cron script to call the hot-backup.py for each one of our repositories. In order to save disk space, we'll pass the script an option to compress the files. Valid archive types include gz, bz2, and zip. Be sure that the directory you are backing up to exists, or the script will fail.
# vi /etc/cron.daily/backup_subversion
# backup_subversion v.1# chmod +x /etc/cron.daily/backup_subversion
hot-backup.py --archive-type=gz /my/repository1 /my/backup/location1
# if you have more than 1 repository, simply
# add a new line for each one
# hot-backup.py --archive-type=gz /my/repository2 /my/backup/location2
5. Test the script.
# /etc/cron.daily/backup_subversionBeginning hot backup of '/my/repository1'.
Youngest revision is XX
Backing up repository to '/my/backup/location1/repository1-XX'...
Archiving backup to '/my/backup/location1/repository1-XX.tar.gz'...
Archive created, removing backup '/my/backup/location1/repository1-XX'...
That's it. Feel free to post questions or corrections in the comments.
For a while now I have been doing a lot of regular tasks manually on my OS X box. On my linux boxes I have been using good old Cron for these tasks. Today I started using crontab, since it is installed by default on Mac OS X. There are several tutorials and sites that have information on crontab, but they were not as direct as I would have liked so I put together this tutorial, Using Crontab with Mac OS X, Unix, and Linux. Enjoy!
Lately I have been working with the Google Maps API. I put together an example of adding and removing a marker from a Google map.
Read about it here
Want to use AWStats but don't run Apache? Here is a tutorial I wrote on getting AWStats and Lighttpd to work together. If you don't know what I am talking about, AWStats is a log analyzing package. It is a very useful tool to get some good metrics on website traffic. When I moved to Rails I also moved to Lighttpd as a webserver. Luckily AWStats came along for the ride.
Tutorial: Lighttpd + AWStats