MiniGallery
January 2nd, 2009I just finished writing another PHP script that I’ve entitled “MiniGallery”. It is used to embed a small gallery right into a page with a little HTML/PHP. Check it out at http://www.redgalaxy.net/minigallery.
I just finished writing another PHP script that I’ve entitled “MiniGallery”. It is used to embed a small gallery right into a page with a little HTML/PHP. Check it out at http://www.redgalaxy.net/minigallery.
Good ol’ Troy, NY. We just had an ice storm a few days ago and the picture shown here is just an image of what the storm left. The storm is both beautiful and terrifying. The tree is completely covered in ice. The storm also came with 48 hours of no power (this is after several explosions, of what I believe to be transformers). The whole night and next day I heard falling and snapping tree limbs. I’m just thankful no tree fell through my window.
Thankfully, I’m home in Rhode Island now.. and far away from any more damage and downed power lines.
It’s been a while since I’ve done an application review.. so here is one! Songbird.. it’s more or less just an itunes clone, so what’s the big deal? It’s Open Source! What’s that mean? Anyone can improve it, write extensions for it, and change its theme. This leads things open to numerous possibilities.
There are already extensions to make songbird communicate with your ipod, download song lyrics, cover art, make mash up disks, and fancy visualization effects. Oh, and did I mention it runs on Windows, Mac, and Linux? Why not just download it and give it a try? It’s free.
So, what’s the downside? From what I can tell the program is currently very CPU and memory intensive. I’ve looked at some of their bug reports and this is a problem they know about and are looking into.. so hopefully it will be fixed by version 1.1.
Overall, I think it’s a great program with a lot of features. Tune it up a little bit and it will be perfect. Give it a shot, you might like it!
And currently wordpress isn’t allowing me to upload images for some reason, so I’ll get a screenshot on here later.
So, I got curious today as I do with most things and I decided to experiment with my laptop. It occurred to me that since it has two network cards (wired, and wifi), that I could potentially load balance the two and get an increased speed overall, so I gave a shot.
My first attempt was bonding the interfaces (via the linux kernel bonding module), but that turned out to fail pretty badly since not only was each interface a different IP, but on a completely different subnet.
After trying that, I focused on more routing table type things. I knew that the routing table had default entries, so I tried to just add two.. but that broke more than it fixed. Then I discovered there is a method to add multiple default gateways. Here’s what I came up with:
ip route add default equalize scope global nexthop via <GATEWAY> dev eth1 weight 2 nexthop via <GATEWAY> dev wlan0 weight 3
Just with that simple code (replacing the devices with your devices, and the gateways with your own gateways), it worked. What linux ended up doing is giving priority to wlan0 (as shown by the weight), and then once that bandwidth got used up, it switched over to eth1. This is perfect. I could be downloading something off a webpage on one, and still be online without any bandwidth bottlenecks on the other.
Aside: For those of you who don’t know how to figure out your gateways, simply to connect to the network and type “route” in a command line. You’ll see a list of different routes. Look for the one that says “default” on the left, and the proper device on the right. In that row you’ll see the listed gateway for that interface.
I doubt this is something I will use every day, but it is nifty, and could come in use eventually.. maybe.
So, I sat down and wrote a small little program on my website for cellphones. It’s a text message based command line system. It receives text messages, processes the command, and sends a response back to my cellphone if necessary.
Some of the commands I currently have programmed in are reading/writing to a notepad file, checking my email, checking the weather, and getting other information from my website.
It was a small project, and only took a few hours to complete.. but it’s probably one of the more useful things I’ve written recently.
In a little more detail, the whole program is based on a PHP backend which runs every few minutes that checks for new messages. If it finds a message, it takes the first word, assumes it’s a command, and runs the PHP file associated with that command, and forms a response, and then sends the response back to the sender.
I’d give out the address for everyone to test, but I’m still working on security features
So, I decided to update the kernel on my laptop today to the latest and greatest (2.6.27.2 at the time of this posting). Unfortunately, it has a nvidia card on it, and the nvidia drivers you can get off the repositories don’t work.
So, what did I do? Of course, I did what every programmer does best. I dived into linux header files and the nvidia source and changed a few things around. My result was a working nvidia for 2.6.27.x
Here’s the link to the source. Should work on all 2.6.27.x
http://www.redgalaxy.net/src/nv.tar.bz2
Happy compiling
PeerNet
Well, I had some free time today I began implementing the server portion of the p2p networking system. It’s still all API and has no functionality yet. Once I get the API written up, I can hopefully write subsystems to connect to it.
Twitter Analysis
The twitter project has advanced a little bit, but not too much because of recent school work and working on my original project of the p2p system (PeerNet). The other issue is the LCD monitor to my desktop computer died, and I’m working to get that replaced. The twitter project was on my desktop.
Web Design & Development:
I also have a webpage under production, but that has come to a crawl because it is a project in which many people are working on, and we’re all busy. It can’t advance much further until I have time to sit down with my team and get some things discussed.
ANOTHER ONE?
Believe it or not, I have another project up in the air as well. I’m debating on improving my ray tracer. My original ray tracer was of poor design (I made it a good 5 years ago). The original concept was to trace point by point to a terminating ray.. so not really a ray at all but rather a line where points in the line a queried. It worked, but was slow. The new tracer I’d like to make would be a volume-ray tracer. Basically, like my old ray tracer, everything would be represented as a volume, however the volumes would be surrounded by a bounding object of sorts, so it would be extremely optimized. Because, then the bounding objects could be placed in a quad tree. I’d still get the adventure of ease to represent objects. Because everything is volumes, it’s really easy to get effects such as sub-surface scattering or layering of fogs/liquids.
THE PLAN
Right now, I think I’m going to try to focus on finishing up PeerNet - At least to the point where other people could start developing it. Intermediately, I’d like to work on the twitter analysis program.. once I get it off my desktop. After those two are finished to satisfaction, I’ll begin work on the ray tracer. Hopefully once an extended break from school comes, I can get the team together again and resume work on the website.
For those of you who don’t know, twitter is a web application that allows people to tell any other “followers” what they are doing. You can update it online, through many client applications, and by cell phone.
I’ve recently started a project (C++) that I hope will analyze twitter’s “tweets” (as they call them), and look for common positive and negative terms. Through these terms, I want to try to make some sort of graphical display which presents the world’s current mood as a whole (and by the “world”, I mean twitter users of course).
Another goal of mine to be implemented eventually is to add support to learn new words and associate them with positive or negative statements.
I won’t pretend to be perfect in the algorithms I use to analyze the statements received from Twitter’s RSS feed. Right now, the “analyzer” is fundamentally just a word search (with some fancy stuff added on that looks for derivatives of the words as well, i.e. past-present-future).
I should hopefully complete the project this week (if my school schedule doesn’t dramatically change).
I went camping two summer’s ago, but I just realized I never shared the panorama I made with the world. Me and a few friends spent a weekend in Crawford Notch, NH. We had some fun, but unfortunately it rained most of the time we were there.
The pano isn’t perfect.. there are some very visible flaws, i.e., one of the clouds moved while I was taking the picture. The flaws are only visible if you look for them, so don’t look too hard!
Well, late one recent night I was sitting around (at about 11 PM or so), and didn’t want to go to bed quite yet. I’m a late-nighter. So I decided I would test something. Many (if not all) routers out there block incoming UDP packets unless the router has been “hole punched”, that is, if UDP packets are being sent both ways as if two computers are trying to send information between one another.
So, what did this result in? If you know about nc (if you don’t, it’s a little linux/unix app to send data across the network), I started that up and started sending back and forth between my desktop here at school, and one of my servers. So, this is fine.. I’m testing to see if routers actually allow hole-punching, right?
My Results:
(Click to see large version).
As you can see… I may have been a little too bored that night.
The good news is I discovered how hole punching works!