I like birds

It’s been another long break here in notsoevil.net land. However, this time I can happily admit that I’ve not been neglecting the place. I have been working on making this quiet place on the net a useful place to keep updated on new music. I realized earlier this year that I am very bad at keeping track of my favorite bands and their new releases. So I started to think about what could be done to fix this.

Naturally, I decided to try and make a website to take care of it for me. And I had a very simplistic mockup all done in php that actually seemed to work (for vague values of “work”). While I was goofing off on the parts I knew how to do, I started looking at frameworks to use for the site. It’s a simple site, so hopefully a framework would help greatly. Initially I looked at CakePHP, and while it looks like a great framework, I realized: I hate php syntax. It’s obnoxious at best. So I decided to go with python and Django. I’m still a long ways from being a python guru, and I have a feeling that a few places of my code are not very in sync with the “best practices” for python. However, it has been pretty easy going.  I am very impressed with Django, and python is enjoyable enough I plan on doing some other projects to improve my skill with it.

Anyhow, I’m not trying to be secrative about the new site, but I don’t feel it is quite ready yet for more than just a few eyeballs looking at it. If you happen to be *really* interested, shoot me an email or IM, and I can send you to the right place. I am excited to get it done though. My goal is to get it going by the end of this month at the latest, so hopefully you’ll hear back from me soon.

ps Meet the Eels: Essential Eels 1996-2006  is a great cd!

1 Comment » 

Lighttpd and gitweb

I’ve begun playing around with git, and so far I’ve really liked it. I wanted a way to start sharing my repository and also be able to browse through it via a web browser. The answer turns out comes shipped with git: gitweb. It’s nothing fancy like gitorious or github but it is 100% functional and is exactly what I wanted. And since I know I’ll be setting this up again someday here’s what I did:

Assumptions: You run Lighttpd, you have a project you’ve been keeping track of with git, and you are not a grue.

First, grab the latest version of git and extract it, then run the following commands to install gitweb to your cgi-bin folder.

$ cd git-someVersion ;# as yourself
$ make prefix=/usr gitweb/gitweb.cgi ;# as yourself
# cp gitweb/git* /var/www/cgi-bin/ ;# as root

Next edit the /var/www/cgi-bin/gitweb.cgi file – basically I needed to change some paths to get the resources loading correctly. At around line 85:

#URI of stylesheets
our @stylesheets = ("gitweb.css")
our $logo = "git-logo.png"
our $favicon = "git-favicon.png"

Change these to be:

#URI of stylesheets
our @stylesheets = ("../gitweb.css")
our $logo = "../git-logo.png"
our $favicon = "../git-favicon.png"

There are other settings that you will probably want to change in this file such as $home_link_str, but they are not required for gitweb to function correctly. The cgi file is documented well enough to figure out what changes will do what. So next up is the lighttpd.conf:

Make sure cgi.assign is enabled and set to use perl:

cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )

Next setup the redirects and aliases for gitweb (still editing in lighttpd.conf):

url.redirect += ( "^/gitweb$" => "/gitweb/" )
alias.url += (
"/gitweb.css" => "/var/www/cgi-bin/gitweb.css",
"/git-logo.png" => "/var/www/cgi-bin/git-logo.png",
"/git-favicon.png" => "/var/www/cgi-bin/git-favicon.png",
"/gitweb/" => "/var/www/cgi-bin/gitweb.cgi",
)
$HTTP["url"] =~ "^/gitweb/" { cgi.assign ("" => "") }

This will let you go to http://servername/gitweb and view your now empty code repository (be sure to restart the server first!). To populate this repository (or add a new project) do the following on the server:

cd /var/git
mkdir project_name.git
cd project_name.git
git init

Now you if you refresh your browser you should see one project, that has no commits and a description that says “Unnamed repository; edit this…”. To change the description edit .git/description from the project_name.git directory. Now there are two things left to do. Back on your development machine (the one with your local git project) we need to tell it that the project is stored on our server:

git remote add origin ssh://servername/var/git/project.git

And lastly, commit to the server:

git push origin master

Now your gitweb should have some files and revisions histories. You can also share your project with other developers now by pointing them to your webserver.

3 Comments » 

How to backup and restore a lot of data on to dvds

I’ve recently decided to backup a bunch of files stored on my server to dvds. Since I really didn’t feel the need to install X or any sort of associated desktop I decided to attempt this all on the command line. Here’s my process:

Tar up whatever needs to be backed up into a single tar file:

tar -cvf file.tar ./dir

Next split it into dvd sized chunks. This is only needed if your tar file is greater than 4.3gib. In my case it was about 14gib. Also 4.3gib = 4.7gb, so I don’t recommend messing with the –byte parameter unless you’re using dual layer or some other media type:

split --byte=4300m file.tar filePrefix

Now there should be several files ready to burn to dvd, which you can do with:

growisofs -Z /dev/dvd -r -J -allow-limited-size ./file

Since this is for backup purposes it is a good idea to use md5sums to make sure everything is correct:

md5sum ./file; md5sum /media/dvd/file

Finally in order to restore the tar file, first copy all dvds to the same directory (again I would md5sum to make sure the copies are correct) and:

cat filePrefix* > file.tar

Untar and enjoy! Now this isn’t the most convenient way of storing backups. I’d like to be able to browse the files on the dvd, but it seemed like too much work to figure out good spots to stop copying the file system onto the dvds. For now this will do, should my disk drive start failing I should have a great starting point to recover from.

5 Comments » 

Who-what?!

Well look at that. It’s been a while. Hi. So guess what’s new? I bought a house and moved into it. It’s pretty sweet. I also married my girlfriend of two and a half years. We’re as happy as pie! And finally this weekend I bought a carseat and a stroller! So the supposedly three big things in life, we’re doing them all this year, house, marriage and kid(from here on called Squirt Jr.). You could say we’ve been busy and that’s true, though now things are settling down at least for a few months.

Jamie is due in November, and from what I’ve been reading the following three months will be quite difficult, but not impossible. However I am looking forward to actually have a kid. A lot of people my age that I’ve talked to have sort of loomed it over me as death sentence (Your life is ending! Have fun never doing what you want…etc). Though I see it differently. Having a kid means I get to do all the kid stuff all over again. Play with legos? Check. Watch Saturday morning cartoons? Check! Scribble wildly on papers? Check! Go to the circus? That too! And what is better, I get to do this with someone who will think I’m the greatest person ever.

I’m optimisitic to be sure. And maybe I have high hopes that while be crashed against the rocks of reality. But I don’t see the end of my life coming soon, just a new adventure. A happy unexpected twist. PS: science.notsoevil.net – my plan to have all the answers a kid could ever ask. PPS: still have to find a theme that I actually like.

2 Comments » 

Float

I went to the Flogging Molly Concert about two weeks ago, and it was pure awesomeness. It was probably the best concert I’ve ever been too. It also helped that I was hanging out with friends I hadn’t seen/hung out with in a very long time. Since then I’ve started the process of buying a house (We have a contract in place! woo!). Which is exciting and worrisome at the same time. Other than that I’ve been enjoying some of the nice spring time weather we’ve been getting lately. I have a few plans on some projects to do, but finding time to code outside of work is difficult these days. On the other hand I no longer have cable and am saving every penny I can so maybe that time will come sooner than later :)

1 Comment »