Thursday, December 30, 2010

Cloudboard: Share text between computers

When I received my CR-48 (read: Chrome notebook), I instantly noticed a need for a shared clipboard between my computer and the CR-48. I downloaded Google's Web Clipboard, however, it took a while for the pastes to appear on both machines and I had to sit and wait for it them to load. So I made my own extension that simplifies the process and allows you to share any type of text right from the context menu. Cloudboard was born.

Install the extension, login via Google to the Cloudboard site and get your token, then start sharing. You can right-click on images, urls, pages and text to share with your other computers and all you have to do is click on the clipboard next to the address bar to see a list of your pastes. If you want to refresh, hit the refresh button, or just open the popup again, it is updated instantaneously with your other Chrome installations.

Feel free to leave any comments that you have. I will be working on notifications, so you can be automatically notified when a new paste exists.

James Hartig

Thursday, December 16, 2010

See the User's IP Using Lighttpd Behind Cloudflare (Updated with Apigee)

Using Cloudflare to protect your website is a great choice, however, it can break your existing applications because the IP that your server sees is not the user's, it is Cloudflare's. Cloudflare has a module for Apache to rewrite the IP with the correct one (here), but not for lighttpd. The following 3 steps will get your IP rewritten and have your access logs printing out the correct IP for the connecting user.

Step 1: Open your lighttpd.conf file and append "mod_extforward" to the end of the server.modules list.

Step 2:  Paste the following code block anywhere in the file (well at least after the server.modules lines)
$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

Step 3: Restart lighttpd and you're good to go!

You should now see the actual user IPs in the access logs and in your applications.

If you want to add Apigee as well:
$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

$HTTP["remoteip"] == "" {
extforward.forwarder = ( "all" => "trust" )
extforward.headers = ("CF-Connecting-IP")

James Hartig

Thursday, December 9, 2010

Chrome Notebook. My Hands-on Review

I received my very own Chrome Notebook today and so far, I love it. Yes it has its quirks, but... its a Google notebook! For the most part everything works, there are just some odd things that fail to work. 

  • First of all, the "Next tab" button, doesn't do anything but jump/bump the side of the screen (odd?).  Once you open a new Window, it switches between windows, but it should not have been labeled a next tab button if it switched windows. 
  • Sync does work, it just takes forever to load.
  • There is a slight lag to the keyboard.
  • Selecting text doesn't work in all cases (read: text boxes). Fixed on restart.
  • Cursor sometimes doesn't change until you click feverishly.
  • Trackpad is hard to get used to, sometimes freaks out.
  • Flash player does not work very well on YouTube, Hulu, etc. Works fine for Grooveshark.
  • USB/SD cards do not work at all. The content browser comes up but it is empty.
  • Can take screenshots but there doesn't appear to be any purpose yet except to send them along with a bug report.
  • Shortcuts to move to next or previous tab do not work.
  • Battery time never finishes "Calculating".

Those are all the issues I noticed so far. But otherwise, the startup time was less than 10 seconds. I haven't ran into any extensions that don't work and websites seem to load and run very smoothly. Also, bettary life seems to be very good. I miss the delete button, but you can do Alt+Backspace to achieve the same thing. Dedicated search button is sweet, especially since it saves me time trying to work the trackpad.

Sent from my Chrome notebook.

James Hartig

Wednesday, December 8, 2010

Woopra in your Tumblr

Tumblr used to not allow third party Javascript in their custom HTML, but this seems to have been lifted. I do not know when but I just tried last night and it seems to work fine now. Woopra is a website that allows you to view your website traffic in real-time. You can now add Woopra to your Tumblr blog to watch your visitors and get detailed information on how they read your blog.

  1. Go to and get the Setup code for the JS script.
  2. Go to and goto Customize on the right side.
  3. At the top of the customize page, hit Theme, and then click Enable custom HTML
  4. Scroll down to the bottom of the HTML box (also under Theme option) till you see
  5. Paste the Woopra setup code right above then click Save + Close
  6. Watch the results in Woopra!


James Hartig

Thursday, December 2, 2010

2 Random PHP Array Functions

Convert an Array into XML

Convert an Array into text like print_r

Don't know what you would use them for. But, enjoy!

James Hartig

Tuesday, November 30, 2010

[Contest Over] Grooveshark Shirt and free VIP Contest

Since it is the holiday season, I will be giving away a free Grooveworld tee (pictured below) and a free year of VIP! All you have to do is answer the following question in the comments and I will ship one to you free of charge! Be sure to include your Grooveshark username so I can contact you if you win!

Question: What was the name of Grooveshark's first released client (application)?
Hint: You could upload and download songs.
The correct answer is Sharkbyte

Sizes and colors available:
XS/S/M/L Pink, S/M/L Blue

No Grooveshark employees allowed

Good luck,
James Hartig

Saturday, November 20, 2010

Disable DNS Suffix

If you are using WOW! Internet or your ISP has provided a "Domain Name" when your router gets it IP from the ISP's modem, all of your requests out of your computer will go to *.{domain name}. For instance, This is obviously not what you want your computer to be doing, so you can fix it in 2 ways.

The easiest is to just fix it on the router:

Just set the "Domain Name" to a period (.) and it will disable the domain name.
Then you need to RESET EVERY DEVICE on the network. If you don't it won't work.

If you don't have access to the router, then you can change it locally on your Windows computer.

  1. Goto Network Connections (or Network and Sharing Center then to Change Adapter Settings)
  2. Right click on your active connection (Probably Local Area Connection) and select Properties
  3. Select Internet Protocol Version 4 and click Properties
  4. Click Advanced
  5. Goto the DNS tab and make it look like this:
Once again, that being a period (.) as the domain name.


James Hartig

Wednesday, November 3, 2010

Chromium's New Custom DNS Feature

Chromium recently introduced a new Custom DNS feature to their about:labs. This would come in great handy to me as I connect to a VPN but want to keep Chromium on my main DNS and not the VPN's. Sadly the custom DNS feature is Linux-only. After digging a bit through the source code, you can enable it by adding the switch --dns-server. I tried: --dns-server= (for OpenDNS) however, it didn't work for me and Chromium kept coming back saying that it couldn't resolve the domain name.

If you can get it to work on a non-Linux system, let me know how in the comments!

James Hartig

Monday, October 25, 2010

LibClamAV Warning: Cannot prepare for JIT, because it has already been converted to interpreter

This happens on systems where you installed 0.96.3. Clamav has released a newer version 0.96.4 and in case your repo doesn't have it listed, you can install it using the following commands (designed for CentOS 5 32-bit):
yum -y upgrade clamd-0.96.4-1.el5.rf.i386.rpm clamav-0.96.4-1.el5.rf.i386.rpm clamav-db-0.96.4-1.el5.rf.i386.rpm
rm -f clamd-0.96.4-1.el5.rf.i386.rpm clamav-0.96.4-1.el5.rf.i386.rpm clamav-db-0.96.4-1.el5.rf.i386.rpm
If you happen to be running a 64-bit server:
yum -y upgrade clamd-0.96.4-1.el5.rf.x86_64.rpm clamav-0.96.4-1.el5.rf.x86_64.rpm clamav-db-0.96.4-1.el5.rf.x86_64.rpm
rm -f clamd-0.96.4-1.el5.rf.x86_64.rpm clamav-0.96.4-1.el5.rf.x86_64.rpm clamav-db-0.96.4-1.el5.rf.x86_64.rpm

James Hartig

Wednesday, October 20, 2010

"No such interface supported" Error

I was trying to fix a Grooveshark bug which required I install IE7, well I found a standalone and attempted to install it, only to realize it wouldn't work. That didn't stop it from ruining some DLLs and causing random Windows shortcuts/links to stop working. Specifically any links to System Properties, Customize toolbar icons, and desktop personalization.

After looking online for a long time, I finally found a solution:

If you don't want to register, I hosted a version: Just run that file as an Administrator and wait a good 10-15 minutes and you are all set. Enjoy!

James Hartig

Tuesday, October 12, 2010

Apigee and CloudFlare. A DNS-protected API solution

While I look for ways to optimize GSUser, I came across Apigee a few weeks ago to track and monitor the people using GSUser. Their site provides analytics on how the API is used and has been a great addition to the internal tools I have. I especially love their debugger, where you can watch and review requests in real-time. If you pay for Apigee you even get to have them manage your API passwords, OAuth and they will cache responses.

Starting last week, I started working on getting CloudFlare up on some domains, I moved GSUser over to their Free plan to see how it worked. CloudFlare protects your website by sitting between your site and the visitor. They provide caching and protection against an array of attacks. Already on GSUser, they managed to cache 50% of all requests and protect me from almost 400,000 malicious requests.

After testing each individually, I decided to move my largest client over to a subdomain that was protected by CloudFlare and yet still running through Apigee and this is where things got messy. I had originally routed this subdomain to on Apigee, which then caused Cloudflare to run into a DNS loop.

In order to properly setup Cloudflare and an Apigee CNAME, follow these simple steps below:

  1. Create a new subdomain (A Address) and point it to your server(s). Then turn off Cloudflare protection on the subdomain.
  2. Go to Apigee and setup your new api and point it at this the subdomain you just created.
  3. After creating your API on Apigee, take your API URL (found under Settings) and create a new DNS CNAME record on Cloudflare pointing to this API URL. You will want CloudFlare protection on this subdomain.
  4. Now go back to Apigee, go to your API's Settings and click "Change CNAME". Then your CNAME is the public subdomain you just created.
  5. Now you can direct all your API clients to your public subdomain ( will be active to prove it works for today).
Enjoy your super protected and analytic-friendly API endpoint!

James Hartig

Wednesday, October 6, 2010

Grooveshark Day 10/1/10

Grooveshark Day was awesome this year! Strongsville High School students got their own special promotion, as well as a video which was played on the announcements.

Here is a picture of everyone at my school and who wore their shirts and came to get a picture at 7am.

Also, we gave out 200 free 1-month VIP accounts on Twitter and on Facebook. Be sure to stay tuned to and @groovesharkday for announcements for next year!

James Hartig

Monday, August 2, 2010

Jailbreak iOS 4.0

I know everyone knows all about JailbreakMe but I'd just like to say, I just used it and it is amazing! I followed the instructions on and I had to use

Also, if you don't get the Downloading screen, try restarting your iTouch/iPhone. I couldn't get anything to happen but after a restart, everything worked beautifully!

Can't wait to try out some Grooveshark on the new iOS!

James Hartig

Saturday, July 10, 2010

Review: MozyHome == awesome! You can save 10%!

If you don't care what I have to say about Mozy, skip to the bottom for the link to save 10%.

As my friends and I started our movie, we needed a place to backup our video and I was still looking for a good alternative to the "external hard drive". I looked at a few online backup places but they were all expensive or slow. DropBox was really expensive for backing up 50+ GBs, but I still use them for all my web project stuff. Carbonite was equally priced but they were slow in my initial tests (utilizing only 40% of my available bandwidth). Then I found Mozy, they offer unlimited space for $4.95/month and they can utilize my full bandwidth pipe!

A screenshot of the MozyHome Status screen from testing.

Now, from that screenshot it says 1.4 Mbps and my pipe is technically 1.5Mbps but it stays around 1.3-1.5 consistently, and this allows me to upload around 13GB of data per day. That really comes in handy when you upload a 30GB music library or if you film 4 times a week and every day is 10GB worth of video...

Their various restore options.

If something bad happens, you can restore via the client or you can have them conveniently send DVD's of your files. Since I have 12 Mbps internet, I don't think it would be too much of a hassle to download the data but in case I couldn't or wanted hard copies, I have that option. This was really important in my decision.

Their client works on Mac and Windows and it has predefined "backup sets" which automatically backup things like your financial data and browser bookmarks. I personally chose to not use most of them because I like the control of choosing the folders myself. You can set a schedule for when to backup:

I wanted to backup all day and I didn't really care about scheduling.

You can also set a throttle and backup speed. I throttle down the internet during the week from 9am to 5pm (as you will see grayed out as it is the weekend) because my remote desktop connection sucks if it is using all the internet :P Also, I set the Backup Speed to "Quicker Backups" because I want it to do whatever it can to backup, I have a brand new computer and it doesn't affect performance at all.

Finally, a new feature of Mozy 2.0 (by the way, this is the feature that sold me) is "Local Backup".
Mozy 2xProtect™ automatically backs up files locally to an external drive in addition to a Mozy data center for double protection of your personal and business information.
Basically, it will backup all my stuff to my external 1TB hard drive as well as online. This is amazing.

If you are looking for a backup service, I HIGHLY suggest MozyHome. I use it for all my backups and soon I'll be implementing it on my servers.

Yes, I make some money off the affiliate link but this post was designed to share my experience with MozyHome and not make money.

James Hartig

Thursday, July 8, 2010

SATA vs USB3.0 vs USB2.0

We recently bought a new Seagate 1TB SATA ES.2 hard drive (ST31000340NS) for our movie video and I decided to test out how it performed in USB3.0 enclosure, USB2.0 enclosure and then just straight SATA.

Our first test was creating a 500MB file with 10MB blocks and 50 blocks.

Our second test was creating 2 200MB files (10MB blocks again) threaded.

Finally, the last test was reading the first file.

As you can see, all three methods performed roughly the same. Every test was performed 5 times (I didn't have all day) and then averaged. Maybe if the hard drive was 6.0GB/s rated then we would have noticed more of a difference? Overall, I think the USB3.0 would only come in handy if you are reading and writing multiple files at once. We upgraded to USB3.0 because I needed a new hard drive enclosure anyways so why not just get the latest and greatest tech?

James Hartig

Tuesday, June 8, 2010

Grooveshark Updates: Desktop Shortcuts and External Player Control API

I've been hard at work responding to users and making small changes to Grooveshark.  While the rest of the team is working diligently at improving the major aspects of the backend and the application itself, I've been working on Desktop shortcuts, releasing the External Control API, as well as some crossfade fixes (coming next release).

To enable the API, users must goto Desktop Options.
External Player Control API (Docs) allows developers to design apps that control Grooveshark from outside Grooveshark. This could be a remote iPhone app, a Firefox/Chrome extension, a remote control or anything where it benefits users to not have Grooveshark Desktop (this will not yet work for the Flash version) open.

The first applications to benefit from the External Player Control API are Desktop hotkeys. Between Terin Stock and myself we developed official Windows and Mac clients to listen and enable global shortcuts. These would enable Grooveshark to have shortcuts no matter what window you have focused/open. Both apps will allow you to define your own keys as well as incorporate a better UI in coming versions. You can read more about the Desktop shortcuts on Jay Paroline's blog.

Along with the above released features, I've been hard at work improving the crossfade feature that many users have come to enjoy. In the next version, you will be able to enable Fade in/out on pausing and resuming. Also, there will be come fixes coming that will enable crossfade while Frowning a song and removing songs from your queue.

Also, I encourage you to look through the next version for a sweet new feature ;)

James Hartig

Monday, May 10, 2010

Quote from jPod

It's weird, but every time I visit the Drudge Report website, I'm the fifty-millionth person to visit it, so there must be a software error on their part, because how could they possibly have more than one fifty-millionth visitor? And I can't wait to see what my prize will be.

Sunday, April 18, 2010

2Wire Router DMZ-Plus Mode

Over the past few days, I have spent many hours trying to get IPv6 working again on my network and getting the Grooveshark VPN to work correctly. I finally got PPTP working after forwarding port 1723 to my computer and loading a few PPTP kernel modules.

Neither PPTP or IPv6 would work without first enabling DMZ-Plus on my 2Wire router to make sure everything passed through to my routers.

Here is how to setup your router in DMZ-Plus mode:
  1. Unplug all devices from the 2Wire router except for your router you want to be in DMZ. Also, unplug any TV boxes as they might through the 2Wire router.
  2. Reset your 2Wire router by unplugging, waiting 10 seconds and then plugging it back in.
  3. Login to the 2Wire and goto the Firewall settings. Then select Applications, Pinholes, and DMZ
  4. There should only be 1 device listed under "Select a Computer". Make sure it is selected and then Choose the radio button: Allow all applications (DMZplus mode).
  5. Hit Save. Now login to your router that is now under DMZ.
  6. Under setup, make sure the router is set to DHCP.
  7. Goto the Status page and click Release IP Address then wait 30 seconds and click Renew IP Address.
  8. The IP address listed should change from 192.168.x.x to your DSL/Cable IP Address. If it stayed at 192.168.x.x, go back to step 3. It might take a few times for your router to pickup the correct IP.
  9. Once your router has the external IP, everything is configured correctly.
Even if your router has the 192.168.x.x the router still appears to be in DMZ however, most obscure-protocols (GRE,IPv6-IPv4) still will not work. The router must have the external IP as its IP address for everything to work correctly.

James Hartig

Sunday, March 28, 2010

IPv6 on DD-WRT simplified and updated script

I have spent the last week testing out various methods of enabling Sixxs IPv6 tunnels and Hurricane Electric IPv6 tunnels and I have compiled and posted the following script which incorporates all of the collected data and even includes how to install traceroute6, ping6, and tcpdump without recompiling!

I tried to make it as easy as possible.

Thanks and enjoy IPv6!
- James Hartig

Tuesday, March 9, 2010

Grooveshark Update v2.0 r20100211.21.

I was fortunate to be talking with the Grooveshark crew as the latest VIP-only update was pushed just a few minutes ago. The latest update brings the following new features:

Instead of the old settings lightbox-style popup, you will notice a brand new settings page, complete with profile information, RSS settings, Notification settings and profile picture. Also, you will notice a new services tab...

Yes, Grooveshark has finally finished Last.FM scrobbling. I have not tested it (I don't use Last.FM) but people have already reported it is working for them. Note this is only for VIP members. On a side note, I can finally close all the discussions on the old (read: check Grooveshark Forums) GetSatisfaction posts.

Also, a feature requested in the forums was the ability to shut off the constant nagging to "Restore previous songs". This feature was enabled in the last update and allowed the user to restore the queue from the last session. There is now a "Remember my answer"-style checkbox on this dialog. I have suggested they accompany this with a checkbox in settings.

Finally, the team has added 2 new languages. Pirate and what appears to be Chinese (confirmed to be Chinese). Hopefully this addition will expand the Chinese market (at least until China blocks it...) and it will be interesting to watch the at-sea market grow as well.

Along with the above features, there were some major fixes and updates applied to ads, which hopefully will stop all those nasty browser hijacks. One way to get all the above features and totally dismiss ads is to get a Grooveshark VIP account. Enjoy the update VIPers!

James Hartig

Monday, February 15, 2010

Moving domains

In an effort to save me money and time, I'm in the process of moving some of my domains and putting them at Dreamhost. The only thing is that Dreamhost costs $9.95 for a registration transfer. Luckily this would be a one-time fee, but still, it is unfortunate that if I already have an existing domain, I'm going to have to re-register it at Dreamhost.

Also, I will be letting the following domains expire:
I think that is it, but there may be another that I'm letting expire. As far as the rest of my domains, almost all of them are already at Dreamhost, the few that are not include, this domain ( and I will be moving closer to when it expires, a few months, and same with but not until mid-June or July. I have already sent in requests to eNom for and because I don't know how long they take for requests and I don't want to be waiting last minute for the transfer.

I will also be consolidating my Google Apps accounts, I have many and I would like to keep them to a minimum so I don't have to check a million emails a day (exaggeration). With deVolf, we have a bunch of Domain Alias's set up for all the deVolf domains and I plan to do the same with my personal domains. is being configured soon (Google takes 7 days to process this domain switch) and is already configured.

Among the other domains that I own, they are either already configured or they are secret. Along the way, I will be posting any problems that I come across.

James Hartig

Friday, February 12, 2010

Perfect regex for removing links when parsing HTML

After a few long hours:

PHP Version:


Actual Regex


That regex was designed for deVolf's new RSS Import feature. It takes an a link and removes the href link and the text inside the . It allows for empty links as well as links without href's. The regex return matches are as follows:
  1. match 1 is whether single or double quotes were used, this is required for later on in the regex and is not usual after the regex is run
  2. match 2 contains the href link
  3. match 3 contains the text between the <a></a>
Things to consider:
  • The regex matches anything after <a> until it hits </a>
  • Between the href="" it looks for a closing quote (that matches the quote used to start it), a space or another html property. Therefore, I recommend checking the end of the url for a quote or space before working with it.
  • It will NOT match newlines that are in the link anywhere. If you want to, add a s after the i at the end.
  • It works with PHP 5.3. I have not tested other versions.

James Hartig

Sunday, February 7, 2010

PHP and twURLa

A few weeks ago I started work on a project, twURLa. Basically, it is a site that tracks domains on Twitter and ranks them. Over the course of the few weeks, I learned a lot about PHP performance and it has been very beneficial, yet stressful. Here are a few things I learned:

  • Sockets are awesome, streams suck
  • Non-blocking is annoying
  • Debugging is very hard with very unpredictable data
  • JSON is better than serialize
  • Disks are extremely slow
  • A simple VPS can power twURLa
Basically, we started out using streams to connect to all the sites we process, which ended up not being fast enough at all! After switching to sockets, I had a lot more control and I was able to get 1 PHP script to process hundreds of  URLs per second. Throughout the process, debugging was difficult with our test data being a stream of Tweets from Twitter. What we did was save portions of the feed and then I would manually process them and compare to what the script says. The thing is: it took me an hour to process what the script did in 2 seconds.

Our VPS is powered by Fivebean. Fivebean has been extremely helpful and without them twURLa would not be where it is now. We had a very low budget and Fivebean allowed us to work around this and get our site up and running without trouble. Their support is very knowledgeable and fast; the average response time was 10-15 minutes.

James Hartig

Tuesday, January 26, 2010

Personal Grooveshark Bug Tracker

If I'm on the computer, I'm using Grooveshark, therefore it is a big part of my life. As Grooveshark employees will be able to tell you, I often submit ideas and bugs to them. Some of them are fixed instantly and others are added to their massive Bug/Feature tracker. Well to make things a bit more public, I'm establishing my own simple bug tracker of bugs/features which I noticed and when I see them fixed, I'll cross them off. The list is hosted on Ta-da. If anyone notices a bug that I don't have or if one is fixed and I missed it, let me know @fastest963.

Please realize that if a bug is marked as fixed, that means it was fixed in preview (VIP-only). The bug/feature should be transitioned to the production environment sometime after (weeks/days).

James Hartig

Friday, January 22, 2010

Twurla: My new site needs your help!

I will post more information regarding the service at a later date, at this point we are just developing and need your help to continue development.

TwURLa is a site where people can find stats for the amount of traffic that a site receives from twitter. We collect the amount of times that a domain is tweeted and aggregate this data by day and apply a rating to every site. Site-owners can now track and monitor their domain as it performs on twitter.

We have been in contact with Twitter regarding their API use and about what data we are "allowed" to show on our site. At this point, we are not allowed to show ANY of the data we were planning on showing. Twitter is not allowing us to proceed because we are not big enough to be allowed to do this. Who says that we will not be huge when we launch? Twitter should not have this power! If you wish to give us a chance and allow us to continue development:

I hope you choose to help us, it is only 1 tweet and it will greatly help us. For everyone that tweets, we will publish your username on our new site.

Update (1/26/10): We have been given upgraded access to the StreamingAPI feed, however the agreements to sign for Firehose and to display stats are not available yet.

James Hartig