22 October 2011

New UFO Reporting Website

I've been spending most of my free time for a while working on a new website for reporting and tracking UFO sightings.  While there are a couple of reputable organizations out there to report UFO sightings to, I found their websites lacking and, in some cases, not very open with their UFO investigation reports.  So, I took it upon myself to design and create a UFO reporting website that I would like, while taking advantage of some current web technologies.

So, what are some of the requirements for my ideal UFO website?
  • Integration with Google Maps.  Clustering is used to identify the areas on the map with the most activity, then you can zoom in for more detail.  You can also restrict the map to any date range.
  • Easy image uploading and viewing.  Images can be uploaded by the person reporting the UFO, they can be easily viewed while looking at the sighting report, and the full-size images can be downloaded.
  • Video integration.  Built-in video encoding and viewing, bypassing the need to rely on YouTube.  
  • Social tools for website members to vote sightings up or down and to comment and ask questions about specific sighting reports.  And, the ability for the original sighting reporter to respond to the questions and comments.
  • Built-in tools for investigations.  Investigation results are posted alongside the original report.  Other organizations investigate sightings, but their investigation reports are closed to the public.  What is the point? 
  • The ability for website members to watch or "follow" interesting UFO sightings.  Email messages notify them when a sighting has been updated with new information or comments.
  • And more...
That's where I am for the moment with the development of SightingsReport.com.  As you can imagine, there are more features to come.  I'm really excited about getting some more really cool features rolled out, and the potential to change the way UFO sightings are seen online.  

Check it out and let me know what you think.

14 October 2010

Lorex "Link" 8Ch H.264 Pentaplex DVR Review

Buyer beware: I recently purchased the Lorex "Link" 8Ch H.264 DVR with 8 cameras from Costco. It was a good price for a security DVR with 8 cameras. I've tried posting a review to Costco's website twice but it has not shown up on their website after a week and a half, so I am posting it here with additional information not included in my original review.

I chose this system because of the "Ultimate Mobile Connectivity". I really wanted to integrate this system with my current network cameras. All I would need for it to work is simple web browser connectivity to the DVR to access the video streams from the cameras.

From the product description, it sounds like web browser access is supported: "single channel live viewing using the Safari web browser". However, Lorex does not provide you direct web browser access to the DVR. You must first register for their DDNS service at lorexddns.net.

Then, this is where is starts to get dicey. You have to setup an account at lorex.digi1.net and give them the address and password to your DVR. To be able to view your cameras through your web browser or mobile phone, you have to login to lorex.digi1.net. This, in my opinion, is a major breach of security and privacy - especially since this is supposed to be a SECURITY device. Anyone inside the lorex.digi1.net system now has direct access to your cameras and DVR without your knowledge. What are your cameras watching? What is some tech at digi1.net watching on your cameras? What can he learn about your property? What other computers in your network can he gain access to now that he has a backdoor into your computer network? Hmm.

Even if you look past the obvious privacy and security implications of giving them your DVR password, the service is hosted in Korea, which makes it SLOW. The whois information below is from the last ip address that resolved (112.188.240.22) from a traceroute to lorex.digi1.net:

[ ISP Organization Information ]
Org Name : Korea Telecom
Service Name : KORNET
Org Address : Jungja-dong, Bundang-gu, Sungnam-ci
Org Detail Address: 206

To be able for me to view my camera that is in the same room with me through my web browser, the image has to go to digi1.net in Korea and back. It is cumbersome and doesn't make any sense to me. Even if you use the Internet Explorer support, it downloads the video decoding software from digi1.net. Even after figuring out the direct url for accessing the video stream since it isn't provided anywhere in the documentation (it is http://yourip:7000/monitor.cgi?Channel=0001 for camera 1), I couldn’t find any video player that could natively decode it.

For some reason Lorex has decided to lock down the video stream of the DVR and force you to use digi1.net.

If all you need is the built-in recording this product is probably fine as long as you don't give away free access to your cameras in exchange for remote access through digi1.net.

Don’t buy this if you want real remote connectivity - mobile phone or otherwise.

Lorex support has not responded to my questions and I have returned the product to Costco.

25 June 2008

ksh auto complete on AIX

Here are some notes if you want to enjoy the same type of auto complete in ksh as bash users enjoy.

I'm shamelessly borrowing this from here, because it took me a while to track down:

Set this:

set -o vi

in your .profile or .login scripts.

To envoke the editor, simply hit the ESC key. Just like going from input mode to command mode inside of vi. Some of the more useful key strokes:


ESC+\ = autocomplete, will complete upto the non-unique character.
ESC+* = space delimited list of all files that match the pattern you started with.
ESC+/str = search the commandline history for str.
ESC+n = search for the next occurance of str.
ESC+k = go back one in the commandline history.
ESC+j = go forward one in the commandline history.
ESC+$ = go to the end of the current line
ESC+0 = go to the beginning of the current line
ESC+i = return to insert mode
ESC+A = append to the end of the current line
ESC+I = insert from the beginning of the current line
ESC+fx = move cursor to the right until the next occurance of x
ESC+Fx = move cursor to the left until the next occurance of x
ESC+x = delete character under cursor and place it in the buffer
ESC+p = place the contents of the buffer after the cursor
(combining the last two keystrokes)
ESC+xp = transpose two characters (I use this alot)

21 December 2007

Rails - error with rake rails:freeze:gems

After upgrading to Leopard with Rails 1.2.6, I was getting this error when I tried to freeze rails:


$ rake rails:freeze:gems
(in /Users/harold/rails/activist)
rake aborted!
no such file to load -- /Users/harold/rails/activist/config/../vendor/rails/railties/lib/initializer
/Users/harold/rails/activist/rakefile:4
(See full trace by running task with --trace)


My solution was to use rake rails:freeze:edge like so:


rake rails:freeze:edge TAG=rel_1-2-6

12 October 2007

New "Draft" Gore 2008 website - See-Al-run.com

Building the See Al run website

I've had this idea floating around in my head for a while. My wife and I both feel very strongly that Al Gore should be running for President... well, actually, that he should be President.

Since this is a more-or-less technically focused blog, I'm not getting into politics here. But I had this idea for a website as a way to encourage support for Al Gore to run.

There are plenty of "draft Gore" type websites out there - blogs, petitions, and general information accumulation sites.

I was intrigued by the simple brilliance of the human element captured by Sorry Everybody after the 2004 election. People take pictures of themselves holding hand-written messages and submit them to the website. Visitors to the site get to browse through the photos. Some are very clever.

So, I wanted to do something similar, albeit with a more positive message. I wanted people to submit photos of themselves asking Al Gore to jump into the race for 2008. I was running out of time because I knew the Nobel Peace Prize announcement was coming up and I wanted to have the site live by then.

I've been swamped with work and other free-lance website projects lately and just never got a break to do it. But then in the last week I got to a stopping point on a project. Then the question was could I pull it off in a week? Build a site from scratch with uploads, tagging, moderator accounts, image manipulation...? In my spare time outside of my 40 hour work week? What the hell - I went for it.

I think I've said this before but it's worth saying again. Ruby on Rails rocks. I coded in PHP for a while and I could never have knocked this project out in anywhere close the amount of time I did it in Rails. But, much of the credit goes to those who create and maintain some of the great Rails plugins.

So, I met my goal. With the help of my wife with testing and content, we went live with the site Thursday night, just in time for the Nobel announcement. In all honesty I don't know that the timing made any difference since I'm still struggling to get people to the site, but it was a good challenge, and I'm happy with it.

Check it out. Post a picture asking Al Gore to run for President in the 2008 election.

01 April 2007

Converting legacy php database to Rails

I've been working on converting an old php application to Ruby on Rails. Several months ago during the development process, I wrote some scripts to take the data from the old database and insert it into the new one, performing any necessary adjustments to the data that was needed. I ran into a problem when I needed to do it again recently in preparation for the move into production because I couldn't remember how I did it the first time. So, here it is:

I used the script outline talked about here: Rewriting a (large) PHP application in Rails, part 1

The database_configuration["old_production"] in the example is pointing to a database connection named "old_production" in the database.yml file.

I saved the script in /lib under my rails app root directory, and to run it use:

../script/runner 'load "my_conversions_script.rb"'



22 March 2007

Rerouting old style PHP query string urls to a Rails app

I've re-written an old php application in Ruby on Rails. In anticipation of flipping the switch from the old site to the new one, it would be nice to re-route requests for the old php pages to their new home.

The old page url would look something like this:

/page.php?pageid=mypage

with the new equivalent being this:

/page/mypage

I wasn't sure if the best place to handle the rerouting would be the rails routes.rb file, or using mod_rewrite in the .htaccess file.

I didn't find a way to do it using routes.rb, so here's the solution I came up with to make it work using .htaccess:

RewriteCond %{QUERY_STRING} ^pageid=(.*)$
RewriteRule ^page\.php /page/%1? [R=301,L]

I added the two lines after the original "RewriteRule ^$ index.html [QSA]" line.

I found all kinds of information about doing the opposite - i.e. rewriting /page/pageid/mypage to redirect to page.php?pageid=mypage. I had to sift through all that to find what I needed.

13 March 2007

Sony Ericcson w300i on Mac OS X

I've been using a Sony Ericsson w300i Walkman phone since Cingular first offered it. I chose the phone not really for the Walkman capabilities, but because I was looking for a phone that I could use to replace most of the functions that my old Palm/Handspring Visor was used for.

Mostly, my Visor was used for the address book, memo pad notes, and calendar. It was getting old, and since I converted from Windows to Mac and bought a Powerbook I ran into the problem of not having compatible Sync software that would recognize the Visor and work with OS X. Ideally, I could replace the Visor with a phone and only carry one device. But, I also didn't want to spend all the money on a smartphone or Treo.

Lots of phones have decent address books. But I also wanted a decent calendar, and really important was the ability to copy text notes between my Mac and the phone. Adequate memory was also a concern, so the ideal phone would have expandable memory.

I wasn't sure the w300i would meet the text note requirement, but I gambled on it and bought it. After purchasing a third party phone plugin for iSync, it worked flawlessly. I bought a 512MB memory card for it, and it really is a great phone. The organizer tools are excellent - the address book and calendar are perfect for what I need. And using bluetooth or the data cable, I can transfer files between the phone and Mac as needed. It has a built-in web browser that is used to open text files.

It also has the other neat features like the Walkman, and even an FM radio, but I have to admit I haven't really used those. The built-in camera isn't great, and the video captures are pretty low quality. But, that's okay - it does what I need. It's a good looking phone, too.

Now, if only Cingular didn't disable other cool features, I'd be totally happy. Greed gets the best of these big companies and they just have to try to squeeze every last penny out of you at the expense of customer satisfaction. But, I'll save that for another post...

07 March 2007

vpnc vs. Cisco's vpnclient on Fedora

After breaking Cisco's vpnclient AGAIN by upgrading to Fedora Core 6, and starting to go through the headache of trying to get it to compile, I poked around a bit to look for alternatives. Voila! I found vpnc, installed it, and had it up and running in no time.

Of course I'm just using the default configuration for now until I have time to try out some advanced configuration and scripting, and maybe the GUI.

Anyhow, good riddance to the terrible Cisco client for Linux.

11 January 2007

Capistrano deploy + Subversion version

Sometimes the mirrors aren't in alignment. Last night was one of those nights for me, and when I can't get something to work (the way I want it to) I tend to dig in my heels and keep pushing. Sometimes that just makes things worse.

I'm working on my first time using Capistrano to deploy a rails app. I have my app in a Subversion repository on my Linux server but I'm working from my Mac Powerbook. I'm walking through the instructions in both the Agile Web Development with Rails book, and the Capistrano manual on the RoR website.

Straightforward enough, once I get my rake/cap commands correct. I get down to the "cap deploy" step and get this error:

$ cap deploy
* executing task deploy
* executing task update
** transaction: start
* executing task update_code
* querying latest revision...
svn: invalid option: --limit
Type 'svn help' for usage.
*** [update_code] transaction: rollback
* [update_code] rolling back


Ok, at this point I have no way to know what svn command the script was trying to execute because it's all behind-the-scenes magic. There's probably a way to find out but I'm too new at this to know. So, Google to the rescue - I find this:

svn log --limit is in 1.2.x, not 1.1.x, so you need to have a 1.2.x

My server has a higher version than 1.2.x, but the client on my laptop is running the 1.1.x client. No problem, I installed it using fink, I'll just update it. No matter what I tried, fink and apt-get told me that I had the most up-to-date version, even though the fink website tells me the stable package is 1.4 something. I tried to get fink to update it's own binary version - wouldn't do it. So, I follow the instructions on the fink site to update from source. Huge mistake. It took f o r e v e r. Fink is now up-to-date on my laptop, but it still wouldn't update svn-client. Whatever. Why did I waste my time like this? Write it off as a learning experience...

So, I used fink to remove svn-client, and downloaded the binary linked on the subversion website. Problem solved.

I guess in this fast-paced web-dev world I need to keep my packages all up-to-date. Sometimes.

10 January 2007

Capistrano show_deploy_tasks

Ok - Ruby on Rails is way cool. And now I'm trying out a deployment for the first time using Capistrano.

The problem I'm finding with all of this is that I'm chasing a moving target and the documentation can't even keep up. Here are a couple of examples:

The documentation told me that I could get a list of deployment tasks and their descriptions by typing "rake show_deploy_tasks". Wrong:

$ rake show_deploy_tasks
rake aborted!
Don't know how to build task 'show_deploy_tasks'


The new command is "cap show_tasks".

Also, the "rake remote:setup" command is deprecated. Use "cap setup" instead.

Really, it's pretty crazy. I'm using the latest Agile book and reading the Cap manual from the Rails site.

05 November 2006

X11, Mac OS X and Fedora

It took me a while to figure this one out.

What I was trying to do was to run X11 applications from my linux box on my Mac. Here's the docs on how to do it:

http://developer.apple.com/opensource/tools/runningx11.html

The problem was that I was getting an error like this:

X11 connection rejected because of wrong authentication.
X connection to localhost:12.0 broken (explicit kill or server shutdown).


Turns out I has a couple of things going on. First, I guess something in my /etc/ssh/sshrc file was causing problems on my linux box. I moved that file out of the way and then got this error:

/usr/bin/xauth: error in locking authority file


I ran this command on the linux box:


xauth -b quit


Logged out, then back in. Problem solved. Now I can run my linux X apps remotely on my Mac. Pretty cool.

30 July 2006

More OpenLDAP recovery...

I accidentally killed power to my Linux box while I was plugging in a new router. No biggie, except OpenLDAP wouldn't start again at reboot because the database got corrupted. I'm beginning to think that trying to use ldap as an address book just isn't worth it.

Anyway, problem resolved, thanks to PaulHowarth/Blog.

Here's the error I was getting:

[root@ldap]# /etc/rc.d/init.d/ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
bdb_db_open: Database cannot be opened, err 13. Restore from backup!
bdb(dc=mydomain,dc=com): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem
backend_startup_one: bi_db_open failed! (13)
slap_startup failed (test would succeed using the -u switch)
[FAILED]
stale lock files may be present in /var/lib/ldap [WARNING]


Here's how the database was repaired:


[root@ldap]# /usr/sbin/slapd_db_recover -v -h /var/lib/ldap
Finding last valid log LSN: file: 1 offset 5315883
Recovery starting from [1][5315755]
Recovery complete at Sun Jul 30 11:31:56 2006
Maximum transaction ID 8000040d Recovery checkpoint [1][5315883]


I also used the notes from PaulHowarth/Blog to add a checkpoint directive to slapd.conf.

26 June 2006

Open File Security Warning: the publisher could not be verified

Stupid Microsoft comes to our rescue again to save us from ourselves.

I decided to update Windows just because I hadn't done it in so long. At some point I disabled automatic updates because I always regretted updating due to Microsoft's continous stupidity. Well, here we go again.

After the update - I also installed Internet Explorer 7 to see if they've made any CSS compatibility improvements - I started getting this message every time I opened a program on our shared network drive:

Open File Security Warning
The publisher could not be verified. Are you sure you want to run this software?


Well, I clicked on it, didn't I?

After stumbling around a bit, here is the solution that seemed to help me:

Control Panel, Internet Options, Security tab, Local Intranet, Sites, Advanced, add \\Server\share as a website to the "zone".

It adds the drive as "file://server" but it seems to help prevent the pop-up from occurring.

There is also this option that may help with programs on a local drive:

Control Panel, System, Advanced, Performance Settings, Data Execution Prevention...

You can turn DEP on for everything "except those I select", and manually add them to the list.

Changing the DEP setting requires a reboot. Of course.

Could the beast get any more bloated and cumbersome?

21 June 2006

Cisco VPN Client on Fedora Core 5

I finally got around to getting my Cisco vpnclient working again after upgrading from FC4 to FC5. After the upgrade and a reinstall of the vpnclient, I was getting error messages like this:

# ./vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: insmod: error inserting '/lib/modules/2.6.15-1.2054_FC5/CiscoVPN/cisco_ipsec.ko': -1 Invalid module format
Failed (insmod)


I read elsewhere that this means it needs the linux headers, which would be the kernel-devel package. You can find out the kernel version you are running like this:

# uname -rm
2.6.15-1.2054_FC5 i686


I didn't know of an easy way to install automatically using yum since I'm not running the latest kernel version and yum wanted to install the newest package that doesn't match what I'm running. So...

I downloaded the kernel-devel rpm that I needed and then did a localinstall using yum:

yum localinstall kernel-devel-2.6.15-1.2054_FC5.i686.rpm

Did a reinstall of the Cisco vpnclient, ran the init.d start script as suggested by the installation notes, and - hooray! - it works again.

I'm running this version of the Cisco client, which was itself a pain in the ass to obtain because Cisco won't let me download it from them even though I've registered with them:

vpnclient-linux-4.8.00.0490-k9.tar.gz

I guess I'll wait and see if I get to go through all this great fun again next time I update my kernel...

07 June 2006

Fedora Core 5, Openldap address book and ldbm vs. bdb

I make attempts at using Openldap as an address book running on my Fedora linux box. It works, for the most part, but ldap is clearly built to be more than just a simple address book server. Because it is by no means user-friendly, setting it up and maintaining for this simple use is a challenge. There's just not an easy way to tie everything together and keep the address book entries up-to-date on the server. Someone please show me an address book application that will update ldap.

I occasionally tinker around with perl scripts and such in a meager attempt to make something useful. Right now it involves exporting my Palm Desktop address book entries to vcard format, and running those through a web-based perl script to convert them to ldif and ldapadd them to the DB.

Anyway, I recently upgraded from Fedora Core 4 to FC5 and noticed later that my ldap was acting funny. By funny, I mean this: from Thunderbird, name lookups would only find anything if I entered 3 characters or less. For example, "h", "ha", and "har" would find "harold", but "haro" would not find anything. From the Mac Address Book, it would never find anything.

I also received a warning at startup about using an ldbm database. So... I figured this would be a good time to switch over to using bdb since that seems to be what most posts talk about on various ldap forums.

The switch was not as easy as changing "database ldbm" to "database bdb" in slapd.conf and restarting. When I did this, I got errors. First, this:

bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2)

So, I copied DB_CONFIG.example to DB_CONFIG and put it in /var/lib/ldap.

Then, I got errors like this:

Checking configuration files for slapd: bdb_db_open: db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2)
bdb(dc=mydomain,dc=com): Unknown locker ID: 0
backend_startup_one: bi_db_open failed! (2)
slap_startup failed (test would succeed using the -u switch) [FAILED]
stale lock files may be present in /var/lib/ldap [WARNING]


Where do I get an id2entry.bdb file?

I decided to start from scratch. I started by uninstalling openldap-clients, openldap-server, openldap-devel from my server. But stopped short of removing openldap when it complained about something like 150 other packages that were dependent on it. So, instead, I deleted all the files from /var/lib/ldap and forced a reinstall of openldap. Then, reinstalled all the packages I had removed. My guess is that the only step I really needed to do was to remove the files in /var/lib/ldap.

Then, I put the DB_CONFIG file back into /var/lib/ldap, restored my slapd.conf, and what-da-ya-know? It started right up.

Repopulated my database and it all works great now.

Google searches on the ldap errors didn't help much. Anything I did come across was vague and spoken like you don't have any business messing with ldap unless you are already an expert. But, unless I'm missing something, Openldap is the only free option available to use as an address book server. And it really doesn't need to be so mystified to keep people like me from trying to use it.

Now that it's working again, I plan to try to get it to play nice with Mac Address Book. There seems to be a problem with the default schema mapping that causes fields to be missing in Address Book. And then, I just need to come up with a solution to keeping the damned entries updated and synched.

06 June 2006

MySQL foreign key notes

View foreign keys:
show table status from db_name_here like 'table_name_here';

Create a foreign key:
ALTER TABLE `db_name_here`.`table_name_here` ADD CONSTRAINT `fk_foreign_key_name` FOREIGN KEY `fk_foreign_key_name` (`key_id`) REFERENCES `foreign_table` (`id`);

Canary Hotspotter didn't detect my network

I just received my Canary Wireless digital Hotspotter yesterday. I had already read on their website that the hotspotter will not detect all networks because of the way some wireless routers transmit their information. Well, my home router - a Linksys BEFW1154 seems to be one of the ones that doesn't work.

I'm not surprised - I've had some strange problems with this router, and I would really like to replace it with something newer and faster. This is just another strike against it, I don't blame the hotspotter.

The hotspotter itself is a cool little device and I'm anxious to put it to work around town. I'll post more about it after I've had a chance to break it in...

If you are running php, and get the following error trying to connect to an MySQL database

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /server/web/path/common/mysql.class.php on line 40
2002 : Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)



Check your php.ini file for the following line and make sure it points to the correct MySQL socket file:

mysql.default_socket = /var/lib/mysql/mysql.sock