Categories
Hardware Unix

Installing Fedora 11 with dual Video Cards

I’m configuring a new desktop setup for myself, using dual Nvidia 9600 GSO cards so I can hook up 3-4 monitors. I’ve been using Fedora more than other distros, so I wanted to stick with it for now (although I was tempted, after running into this issue, to jump to Ubuntu).

I had problems getting the DVD bootup to go into graphical mode, it kept showing an error that it couldn’t start X, and would continue with text mode. Of course, this is less than ideal since the text mode doesn’t have all the nice install options (not sure why) so I needed to figure it out.

The easy solution was to remove one of the cards and try again! This did the trick, and now I have Fed11 nicely running on the one card powering two monitors. Another thing to note is that I had to install Nvidia’s linux drivers. Also note, that if you run “yum update” after installing those drivers, you will need to re-install them one more time since yum will overwrite their functions.

My next step is to plug in the 2nd card and see if it is recognized properly and I can get 3 monitors going in independent configurations…

[Update] I added the second card after the fact, and now have 3 monitors hooked up nicely with no problems!

Categories
Coding Unix

PHP not fully recognizing php.ini

OK, here’s an odd one I encountered on one of my older servers running Apache2 and PHP 5.2.5

I had php scripts failing and generating “500” errors on the browser because they were running too long, or sometimes because a large file was being uploaded. I spent time playing with php.ini variables, only to find out that PHP wasn’t processing some of them!

Using phpinfo(), I noticed that the vars were not being set via php.ini, which I had set properly when it was compiled, ala:

‘./configure –with-apxs2=/opt/apache2/bin/apxs –with-mysql=/opt/mysql –with-zlib –with-config-file-path=/etc/php.ini –with-curl=/usr/lib64 –with-pear=/usr/share/pear –libdir=lib64 –with-pdo-mysql –with-gettext –enable-bcmath –with-oci8=instantclient,/home/instantclient10_1’ ‘–enable-sigchild –with-pdo-oci=instantclient,/home/instantclient10_1,10.1.0.5’

I didn’t want to risk affecting the system by re-installing PHP, so instead I found the workaround was to create a .htaccess file that contained:

php_value upload_max_filesize 8M
php_value max_execution_time 600

and this did the trick! So hopefully that helps anyone who is running this version of php and encountered this problem.

Categories
Photos

Google Screensaver on x64

Well, I’m in the process of configuring a new Vista Ultimate system on an Intel 64-bit cpu.

One of the first problems I had was I wanted to get the google screensaver working. I downloaded Picassa and that includes the screensaver app, but I was not seeing it as an option on my windows control panel screensaver section!

Turns out you need to:

Go to C:\Windows\SysWOW64 folder, copy the file
GPhoto.scr and paste it in to the C:\Windows\System32 folder.

Now it works great! Now if only google will adapt it to allow arrow controls to go back/forward through the photos.

One more note… if you using windows media player to play music, you’ll need to go into tools->options and check the “allow screensaver during playback” box to have the screensaver work when music is playing.

Categories
Websites

Ontok’s domain has expired!

I’ve been using ontok’s API for geocoding for a few years now, and all of a sudden my routines were getting errors! It turns out their domain expired!

I’m not sure why they let that happen, I’m hoping they just didn’t pay attention and it will be back up soon. Maybe I should just call Sourabh! 🙂

Domain Name: ONTOK.COM
Created on: 20-May-05
Expires on: 20-May-09
Last Updated on: 20-May-08

Administrative Contact:
niyogi, sourabh  niyogi@mit.edu
humdaq, inc.
55 Grove St
Somerville, Massachusetts 02144
United States
6177641078      Fax —

Categories
Hardware

Bluetooth Clash with WiFi

I was helping a friend with their Sony Vaio laptop, and they just added a Bluetooth enabled mouse and found that now their wireless connection won’t work!

The laptop has a little switch on the top of the keyboard that turns wireless on/off, and usually when you turn it off and back on, the computer will recognize the wifi hardware and it can find networks. But in this case, it wasn’t working, and no wifi networks were begin discovered.

After an hour of trying all sorts of things like checking out network settings, etc, it turns out it we had to use a function key (F1) to toggle between different Bluetooth/LAN/WAN settings! We had to choose the setting of Bluetooth and LAN to get this working. Apparently adding the Bluetooth device switched this setting, and the only way to get it back is to use this poorly labelled function key. Live and learn.

I had googled around to try and find help on this, but nothing pertinent showed up — so hopefully this post can help someone who has this problem in the future!

Bluetooth LAN function key

Categories
Fun Stuff Hardware

Setting up a Digital Media System

For many years I’ve had my own home file server tucked away in my basement serving all my home file needs. It is a Linux box with 2 Terabytes of storage that acts as:

  • a NFS file server for other UNIX systems
  • a Samba file server for Windows systems
  • a LDAP server for keeping a single location of contacts
  • an Apache web server for an internal website of links and other information (photos, etc)
  • a Slimserver daemon that provides support to my Squeezebox
  • a MediaTomb server that provides support to my DLINK DSM-520
  • an internal Domain Name Server (DNS)

and more!

I use this setup to hold all my digital photos, audio (mp3) files, and I’m now in the process of scanning in my DVD library. So let me take a moment to say “Just say NO to piracy!”

I personally have found it to be cost effective to buy used CDs or DVDs and scan them in to get good quality recordings, and all my media stays only on my local server that is inaccessible from the Internet. Aside from the legal issues, who wants to clog up their Internet connection with unnecessary traffic for others?

I’ll pass along some things I found while building my setup. I never went the iTunes route because I’ve always used mp3 players that were smaller and cheaper than the iPod. Plus, I want to use a generic format like mp3 and not be limited by what I can play it on. With mp3 I can play all my music on my computer, laptop, stereo (through Slimdevices Squeezebox)  or even my DSM-520. It is simple enough to get your CDs into mp3 files so I won’t go into that.

Inexpensive and niceNext, the video portion. I chose the DSM-520 because I wanted a cheap box that had no moving parts (i.e., no hard drive) that would talk nicely to my fileserver. Well, it turns out that it doesn’t just look for a fileserver using something like Samba — it requires a UPnP type server to be running. DLINK gives you one, but it is for Windows, and you can’t really have a Windows box on all the time to that purpose. At least, not reliably 🙂 Seriously, I have linux boxes that have been up for 450 days with no problems. I can’t let a Windows box go for 3 weeks before all hell breaks loose.

So, I looked around for some UPnP server software I could use and chose MediaTomb which I could easily add using Yum. It is simple enough to run, and lets me add video/photos/music that puts references of those files into a MediaTomb database.

Now you need to scan your DVDs into your library! There are various free packages (like handbrake) which I looked at, but in the end I settled on CloneDVDMobile which is by SlySoft, a great little company that I’ve used for their AnyDVD software which allows me to watch my DVDs on my PC (believe it or not, some DVDs refuse to play nice on a PC).

When you use this software, you are given a whole slew of formats to choose from. I used the generic DivX one that produces AVI files. Most DVDs will offer me the 852×480 resolution, and I max out the quality which goes to 25-29 usually. I use 2-pass deinterlacing and prefer saving it as one big file.

The AVI files it produces look great on my win media player, and I had some trouble figuring out how to make it look nice on my DSM-520, and after much hair pulling it turned out that I just had to alter the aspect ratio in the DSM-520’s settings screen to 16:9 and then it was perfect!

So now I can kick back on my couch and flip through all my DVD titles and watch anything I want with a touch of a button!

Of course now my wife says, “There’s nothing here to watch! It’s all The Matrix and James Bond!”

So now I need to scan in a bunch of Julia Roberts movies.

Categories
Poker

My World Series Experience

I was at some of the World Series of Poker 2008 and it was my first time at the event. I was only there for 4 days, and I played in event 48, a no-limit hold ’em event that was set to last 3 days if you made it to the final table. It started with about 2,600 people and I managed to outlast my friends to make it to busting out around with 500 people left. You know what all the losers say, “I didn’t make the money but it was a great experience.” There is some truth to that if it is your first time at the WSOP! It is a bit like poker heaven. All the table felt is brand new with no worn down sections like the crappy cardhouse near me. All the cards are new and crisp, and the atmosphere is electric.

There is one hand I had in the early rounds which goes as follows. The blinds were 25-50, I had about $3500 in chips, and I had [7s][7h] in early position. I open raise to $200, and I get three callers.

The flop is [7c][8c][9h]. I am first to act and bet out $500. The first person folds, the second and third people call.

The turn is [Jh]. I bet out $1000 and he calls. The river puts another possibility out there, [2c]. At this point, I check. The fact that both of these guys are hanging around doesn’t make me happy. I have bottom set, and there is a potential straight and flush out there.

The first guy checks, the second guy goes all-in and has me covered by a little bit. It is early in the tournament and I figure that I don’t want to bust out so early, and I still have enough chips to get back in the tournament, so I fold.

The first guy calls and turns over [Ad][9s]. The second guy turns over [Jh][8h] for two pair. Man, I almost jumped out of my seat for laying down to these guys!

I really figured one of these guys either had the Ten or a Club or even a better set. It turns out later the guy who won said he was playing very loose and aggressive to try and chip up fast. Well, poker is a series of lessons, isn’t it?

I swear this hand left me steaming for a good 15 minutes, but I managed to stay tight until I calmed down and then ramped up my chips for a bit until I lost steam at the end of the day. I can’t wait until next year 🙂

Categories
Coding Poker

Inline Poker Cards

I created a WordPress plugin to display small poker cards in blog posts. Once you install the plugin you can use the nomenclature of:

[Ac]

to show the card of Ace of Clubs for example. You use a two-letter code that is Rank and Suit to show a card. The ranks/suits are as follows:

Ranks: 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K, A

Suits: c, d, h, s, x

where c=Clubs, d=Diamonds, h=Hearts, s=Spades, and x=Unknown

So go ahead and tell people how you had your [Ad][Ah] cracked by a donkey with [5c][8c] !

Download the plugin here

Categories
Coding Hardware

Tips Using Amazon EC2

When I started using Amazon’s EC2 service, I found it hard to gather all the info I needed. There was no easy guide that provided all the steps in an easy format. So, here are some tips I hope some might find helpful. I am interacting with EC2 from a Linux system, so my tips are from that viewpoint.

I assume you have already done the basics, like created your developer account (and know your secret key), and installed the command line tools.

Note that you will need Java installed on your system for the tools to function.

You can find the official EC2 docs here.

Now, on to my tips!

Find A Starter Image

You can browse the images at Amazon via the command :

% ec2-describe-images

You’ll see a bunch of images that are out there, in different UNIX flavors, and some with LAMP already installed. I found that whatever you pick, you’ll want to do your own package installs anyway, so just pick a baseline that you like, i.e. Ubuntu or Redhat or whichever you feel comfortable.

Note that you need the AMI string of your choice to continue. Not only will you see a number of Amazon created AMI’s, but other folks have created some public AMIs that you can choose from. Here are some AMIs for Ubuntu you can check out.

Choose A Server Size

Note that EC2 provides a small, large, and extra-large version your can use. I’ve found that the small instances are incompatible with the the large and XL, so be careful! You should start with the large if you plan on any expansion whatsoever.

So when you are ready to create an instance, you’ll need to specify the size (m1.large or m1.xlarge) on the command line otherwise it will default to small, i.e.:

% ec2-run-instances ami-20b65349 -k gsg-keypair -t m1.large

You’ll need to create a gsg-keypair file first of course. This is described nicely in the command line docs, you’ll use “ec2-create-keypair”.

Note that you can apply a firewall to your instance via the “-g <name>” option, where you define a group with the name of “<name>”. You can see what groups you have via:

% ec2-describe-group

You can create these groups using commands like:

% ec2-authorize mygroup -P tcp -p 22 -s 0.0.0.0/0

Access Your Instance

After you run an instance, you can check on the progress via:

% ec2-describe-instances

And you can provide the instance name also, e.g.

% ec2-describe-instances i-be9237aaa

Then you can SSH into it when it is ready by using the domain name it returns, e.g.

% ssh -i gsg-keypair root@ec2-67-200-1-123.z-1.compute-1.amazonaws.com

Customize Your Instance

You should now make sure your instance has all the packages you want, and configure them how you like. I install the latest Apache, MySQL, PHP, Perl, etc, and edit all the configuration files to my liking.fone

Make sure you stay in “/”, and do not use “/mnt” since this will go away if you reboot and won’t be saved when you save your instance.

If you need more space, you can use the extra storage service from Amazon although I have not done that at this point.

When you have everything the way you like it, you should save your instance. You will use ec2-bundle-vol to create the image, and ec2-upload-bundle to upload it to Amazon’s storage service.

You’ll need your secret key, access key, cert key, user id and a sample command set is as follows. You will run these from your Amazon instance (where real keys and numbers are replaced by X’s and fake numbers):

amazon% ec2-bundle-vol -d /mnt -k pk-XXXXXXX.pem -c cert-XXXXXXX.pem -u 432132132132 -s 1536
amazon% ec2-upload-bundle -b my_image_name -m /mnt/image.manifest.xml -a XXXXXXX -s XXXXXX

Once it is uploaded, you will need to now register it as an AMI image you can access later. You need to do this command from your local host:

% ec2-register my_image_name/image.manifest.xml

This will output your AMI string that you need to note so you can use it later to use your new instance on new Amazon servers.

Cleanup When Done

Don’t forget to make sure you terminate instances you don’t need to use anymore, or you will continue to be charged for them! Run “ec2-describe-instances” to see what you are running, and then you can use “ec2-terminate-instances” with the instance string as an argument to remove them.

Categories
Fun Stuff

Segway Crash!

I live near Fisherman’s Wharf in San Francisco, and for those of you who don’t know, “The Wharf” is one of the most visited tourist area anywhere in the world. And as such, it is filled with all sorts of products and services that a tourist would be drawn towards, such as Alcatraz T-Shirts, Golden Gate Bridge snow globes, and, yes, you guessed it — Segway tours.

Every now and then I can spy a group of around 20 tourists in single file segwaying around the streets of San Francisco. On this particular day I watched as five of them got into a big pileup and fell over on top of each other in the middle of an intersection! These things are supposed to be easy to ride, but apparently not too easy.

I couldn’t get my camera out in time to catch the tourists flailing around with their segways on top of them, but here they are trying to drag these things up and out of the way of traffic.

Boom! Crash!