This blog was created as a storehouse for the random bits of information that I am always trying to pack away and recover later. Mostly it is intended to hold the simple recipes and instructions for doing basic tasks that I can never remember, don't want to look up again, and would like to have available. If you find the information useful, that's great. If you feel the need to comment, correct, or augment the info--even better!
Wednesday, December 30, 2009
Underhanded C
The Underhanded C Contest is great. This year's contest is out...you have to write code to surreptitiously lose luggage. I wonder if I can remember enough C coding to enter...
Friday, December 25, 2009
Nokia N900
I've had my Nokia N900 for about a day now, and I can report that it is an awesome phone. It is the ideal geek phone. I have never had a phone that I could drop into a command line if I wanted to. Not only that, but I can ssh into (or out of) the phone.
There are obviously not as many apps for this phone as there are for the iPhone or Windows (which my previous phone was), but nearly everything I used to use is there and many things are much easier (like the simple SSH connection to the phone, which makes transferring music or pictures on or off as easy as a network operation between two computers).
There are obviously not as many apps for this phone as there are for the iPhone or Windows (which my previous phone was), but nearly everything I used to use is there and many things are much easier (like the simple SSH connection to the phone, which makes transferring music or pictures on or off as easy as a network operation between two computers).
Saturday, December 19, 2009
Apache virtual hosts
Just saw an article which helped me easily create a virtual host for Apache on a Debian install (Sites and Modules, Linux Format #126, p63, but I can't find the article online to link to it). In any case, it made setting up a virtual host on my Ubuntu laptop very simple. The article explained the debian setup for Apache. The virtual host setups are in the sites-available directory (there is also a mods-available directory which works similarly to sites).
Friday, December 18, 2009
Drupal multisite
I needed to create a new website with Drupal. I have existing basic hosting with drupal set up on the main site. To extend it to add another website, I did the following:
Wednesday, December 16, 2009
Use fail2ban
If you have Linux with ssh exposed to the internet, fail2ban is a must. I have a Linux VM which allows SSH connections via the internet. It doesn't have a static ip address, but I am using dyndns to make it easier for me to access from outside.
Within a few days of opening the port on the firewall, the logs started filling with attempts to break in. There are repeated attempts to login with an alphabetical list of usernames, all from an IP address which is located in China. Fail2Ban lets you set limits on how many times a single IP address can fail login before that IP address is banned for some specific amount of time.
It is found in most of the repositories, and is easy to set up. Check out the website for configuration details (http://www.fail2ban.org/)
Using Git locally for revisions and backups
Git is great. You will probably see me mention it alot here. Or you might not, since it is one of those tools that should just become invisible in the background. If you are used to working on a centralized version control system (like Subversion) you probably have a scenario like this:
- Create a branch on the server for your changes and copy from the trunk.
- Work locally, and periodically commit changes back to the branch as a backup.
- Merge the changes back to the trunk when they are ready.
Subscribe to:
Posts (Atom)