Archive for the 'Hacks' Category
I was interested in monitoring a website for changes (to see when something was back in stock). I found a website that would allow me to do that very easily aptly named www.changedetection.com. The site is very simple. Just enter the URL you want to monitor and your email address. From there you get controls on the frequency, type of change you are looking for (any change, large change, additions, subtractions, etc).
They also have a social component in that you can see what other people are monitoring. Sounds like maybe an interesting digg like thing in a way….social bookmarking of sorts.
Anyway, not a day later I found another nice use for the site. I made an FTP upload directory for my clients. Either the client would have to email me when they uploaded something or I would have to check daily. But by simply putting a .htaccess file in that directory (with a single line of “Options +indexes”), I could make the upload directory listable which allows changedetection.com to check it for changes. Works like a champ.
Only issue might be security as now anyone can see the FTP directory. But for what I am using it for (uploading recorded video clips which will be on the main website in a day anyway) this is a perfect match.No comments
Whether you have a corded or wireless version, sometimes the trackball will get gummed up with oil/dirt. Since the mouse does not come apart very easily and the parts inside the trackball are very tiny anyway, taking it apart is not a very good option. The best approach I learned today (at the Apple store in Reston) is to simply take a piece of paper and turn the mouse upside down and roll the trackball around on the paper. The oils and some of the dirt come off on the “rough” paper. My experience using this method restored my track ball to 100%.
This may also be a good approach to cleaning blackberry trackballs. They are very similar mechanisms inside.
When the new iPhone 3G devices were released last year, one of my clients gave me his old iPhone (he upgraded). I played with the device and loaded it up with games. It was basically an iPod Touch on steroids (camera, etc).
Anyway, my kids loved playing games on it so we always took it on long drives. This past week my son was using it and stuck it in his jacket pocket but forgot to zip it shut. Later when he took off his jacket, the iphone fell out onto the concrete parking lot. Ouch!
The glass had 2 small “divots” but it was not cracked. The divots were a result of the impact which also seemed to broke many sections of the LCD display. The display was not cracked, but as I would later understand, the liquid itself had been forced out of some of the areas and as such the display had a lot of lines through it. I was especially bummed as I was about to switch to ATT and buy an iPhone 3g and give the old iPhone to my wife. Whoops!
When we got back I did a little research on the web and some experimentation with Brasso, a dremel tool, steel wool and a few other things. What I found that worked was some very fine wet/dry sandpaper. Like 1200 or 2500 grit type stuff. I used a somewhat coarse version (1200 grit) with water to literally sand out the scratched areas…all but the biggest one which I was only comfortable sanding out part way. I had to use a reasonable amount of pressure in the sanding process. The divots in the iPhone screen got a lot less noticeable from the 1200 grit sand paper but in the end the glass surface had a very finely scratched finish left over from the sand paper.
Next I used a finer grit (2500 or so) to smooth out the area a bit more. This worked well and left the iphone with more or less a “matte” finish in the area where I was sanding – basically finer scratches. The scratches from sanding were gone and what was left was more or less a haze. Oh, and a nice side effect of the sanding process (pressure) was that some parts of the LCD screen got better. I had fewer bad sections/lines in the LCD screen. I think the pressure forced some of the liquid back into some parts of the screen. As you can see from the pictures, the LCD is still not perfect, but it is better than it was (trust me).
While the iPhone’s screen was very usable now, I wanted to get rid of the haze/matte look to the half of the screen where I had been sanding. So I ordered some Cerium Oxide and a large buffing/polishing wheel from Caswell Plating. The kit arrived in 3-4 days and I went to work.
I put the polishing/buffing attachment in my drill press and ratcheted the speed (RPMs) to the highest setting it would go. I mixed some of the cerium oxide powder with water to make a substance with the thickness of heavy cream. According to the directions, you want enough water in the solution so that the buffing does not heat up the glass too much. This is important as it is not only glass we are polishing, but an LCD display right underneath.
I applied the liquid cerium oxide mixture with my fingers directly to the iPhone screen and polished the screen for about 30-40 minutes total. The actual process was tedious…put solution on the screen, polish for 10 seconds, put on more solution, polish some more, repeat. Warning: you don’t want to put too much pressure on the buffing action as it will heat up the glass in one spot and might crack the glass or damage the LCD underneath. I would buff for a few seconds and feel the heat of the glass to see how I was doing.
Periodically I would wash the iphone with a wet rag to see my progress. This slowed me down, but being the first time I had done this, I wanted to make sure everything was going well.
In the end, I think you will agree that the screen is 1000% better than it was. I could likely go further and get it to be perfect, but that would take a lot of time and might risk damage to the screen. The only areas of the screen I found hard to polish was the area near the edge. I think the polishing wheel was not making full contact with the glass due to the small metal lip that runs around the edge of the iPhone. But it is pretty good.
After the polishing, I used a pin, a wet clothe and some canned air to get the polishing compound out of the small holes and gaps in the iphone case. Not sure if there is a better way or not, but this seemed to work just fine.
A technical issue at our email hosting provide this week forced us to move a bunch of mailboxes to a new server. The moves went just fine for 6 out of 8 people. But two people experienced duplicate calendar events on their blackberries. Evidently the blackberry had some data left over from the old server and sync’d up new event data to the new server which resulted in dupes. One user told me about a couple of issues and he deleted the dupes on the BB and it seemed to work just fine. So I thought nothing much of it.
Another user, Jessie, had a lot of dupes and when she went to clean it up on her BB, she ended up deleting the events on the new server. This left her with stale, non-sync’d events on her BB and an empty calendar on the exchange server. Had I known, I would have just had her wipe the handheld and re-activated, but the damage had been done.
I tried restoring her calendar from her Blackberry via USB but the blackberry has limited data, is unaware of “all day” and “recurring” type events, and is generally missing a lot of other fields/data…so it was a dead end.
Jessie’s calendar data was gone. Or was it?
When you go to web pages with forms, most modern web browsers will try and help you fill in the form by remembering what you typed into a form in the past. So if you start typing your name into a field that is depicted as a “name” field, then the browser will offer up suggestions as you type. This is a great thing.
But once upon a time I typo’d my email address in a form….instead of firstname.lastname@example.org I entered email@example.com. I don’t recall what form it was for, but I think I realized it when I never got email from that site. No big deal, I just re-did the form on that site and went along my way.
But what happened was that Firefox remembered my typo. So now when I fill in forms with email addresses, I would get two suggestions for my email address…one correct and one typo. Worse yet, the typo one was the first choice. This has stung me a few times when I was in a hurry so today I searched for the fix.
Turns out Firefox stores form suggestions in a file called formhistory.sqlite located in /Users/someuser/Library/Application Support/Firefox/Profiles/someprofile.default/formhistory.sqlite
I opened the file in a text editor initially just to see if I could find the typo and it was there. Before I made any changes, I made a copy of the file (for me it was a 700KB file…and not something I could afford to f-up). After making a copy, I tried to make the correction by changing the text to the correct spelling of my email address. I figured it would simply have two “Correct” spellings after that change. But the edit I did made the form file not work anymore. Thank god I made a backup.
So I went to versiontracker.com and looked for anything in the Mac OS X area that allowed browsing and editing of SQLITE database files. I found MesaSQLite. Once I downloaded the software (shareware), I was able to open the formhistory file (even double-click to open) and search for the typo email address. I played with the table and field search settings till I found which one had the data I needed:
table=moz_formhistory value=<my typo'd email address>
I edited (in my case deleted) the record and COMMITed the change. Put the changed formhistory file in place of the old file and restarted Firefox.
No more typo!12 comments
I am doing more backups for clients these days. One issue I ran into was that the ReadyNAS’s web user interface does not provide many options for how an rsync job runs. For example, while you can control whether or not files are deleted on the remote machine, you can not control most other standard options. I needed to specify two options:
1) I needed rsync to run on an alternate port so that I could map that port to the right backup readynas machine at my home office (I have more than one now). Without the ability to specify ports I had no way to target the correct readynas machine behind my office firewall. Well, there are ways, but VPN and SSH solutions were not exactly what I wanted. I just wanted to specify –port=XXXX
2) I needed to constrict how much bandwidth the rsync backups could use. This was mostly because my clients have slower internet connections than I do and if I let rsync just run, it would eat up all the upload bandwidth at my client’s location (if the job ran late). While there are some controls for this in the QOS settings in the router at my client’s location (running DD-WRT), I thought the rsync option would work just fine. I just needed to be able to specify –bwlimit=50
I looked around a lot for a solution but could not find one. I even called Netgear and their support team did a great job understanding the issue and thinking about solutions with me. But in the end they admited they had no Web UI solution and that getting access to the unix shell and setting up a job in CRON was the only solution. So I set up a job in CRON and it has been running for several weeks without issue. Basically it is just a small shell script with a bunch of rsync jobs that run daily.
But my shell script was just adequate. I am not a unix programmer so some of the more complex things I wanted from my backup job were not in my dinky script. I did have it email me when it was complete, but I never new if it completed properly unless I manually looked at the logs each day (which I didn’t). And I had nothing in my script to prevent another backup from starting even if the previous day’s backup was still running…a real possibility. From looking at the backup jobs built into the readynas, I could see how they provided these and other options, but I did not fully understand how to add them to my script so I didn’t.
Then today I happened to stumble upon Ian Macdonald’s post about how he added a little PERL code to the ReadyNAS’s backup script generator (it generates the shell script that actually performs the backup). This addition let’s you use the ReadyNAS web UI to create jobs as you normally would. But when the jobs are executed, his perl script additions do a lookup in an external file to see what options to apply! Bingo!!
His code was fairly simple. It looked for a config file called /frontview/conf/rsync.conf. In that file his perl code would look for a matching source or destination for the job in question and apply options. Simple enough. The only downside (minor) is that the TEST CONNECTION button in the web UI does not use these options. So for me, connecting on a different port, I could not use the test button. No biggee….this is just a small inconvenience.
Now I can create jobs in the web UI and be assured that jobs will only run one at a time and also provide emails with the logs when they complete. And I have full control over what rsync options I want the jobs to run with. Cool!No comments
One of my clients wanted to download the front page of several newspapers each day and make them easily accessible to the entire staff. When they asked me for help, they were doing it manually by visiting the Newseum’s website and downloading the front page of each paper manually (via bookmarks in their web browser) and then using PDF Combiner to output 18 front pages as a single PDF. Then they would email the 10-20MB file to everyone.
Well there were a number of issues with that approach including the manual process (time consuming) and the large file which was filling up outboxes and inboxes. At first we explored how to make the PDFs into smaller files…perhaps a JPG of the page instead of a PDF. But this was problematic as it was then hard to read the fine print if the reader actually wanted to read an article as opposed to just seeing the headlines.No comments
The other day I was using my Sprint cell phone as a modem connected to my laptop over bluetooth. I was surprised to receive a normal voice call during the data connection. I took the call as normal and when I was finished I hung up and the data connection went right back to working without having to do anything on the laptop. It was just like my old Cingular service used to work. Why was I surprised? Well because I have always been told that this capability (to put a data session on hold and allow a voice call through) was an amazing feature of the GSM cellular technology and the antiquated CDMA technology just “could not do this”. Those darn sales people.
So I looked online and found out that Sprint does allow incoming calls to your phone during a data session BUT only if the data TX and RX happen to be idle at the moment the call comes in. I guess I was just lucky the other day when the call came in as my data session must have been fairly idle. So I poked around a little more online and found this site which explained how to switch the feature to ALWAYS allow a voice call to place your data session on hold. And I just tried it and it works exactly as you would expect….you are in a data session using your phone as a modem and a call comes in. The data session is “put on hold” while you take the call. Then when you hang up the voice call, the data session resumes automagically. Laptop has no idea the data session even paused! (of course if you are on the phone for a long time, I imagine some data session stuff might time out on the laptop, but that’s another issue)
Anyway, the way you do this is right on the web page above. It involves going into the service menu on your Motorola V3m phone (by entering ##3282# as the phone number). Then you select EVDO from the menu and edit the DDTM setting to be OFF. Very simple, but you need to get your phone’s MSL code to do it!! This code, called the Master Subsidy Lock, is of course some silly secret of the cell phone company. And they usually will not give it to you. But I found a simple way to make them give it to you. Just call up and say you put a security lock code on your phone and have forgotten the password lock code. They will tell you to try the last 4 of your SS# and the last four of your phone number, and a bunch of other stuff. Just say “its not working”. Then you will get transfered to technical support. They will tell you to enter the magical service menu by hitting ##3282# on your phone. Once in, they will walk you through the menus and eventually tell you to hit EDIT on one of them to reset your lock/security code. The phone will then ask for your MSL code before letting you do this. Just write down what the tech support guy tells you. Now you have your MSL !! (fyi, the MSL is different for every phone and its based on the IMEI code which is unique to every device…so don’t use an MSL code for one phone on another phone even it’s the same make/model or you can lock your phone forever as this code is also related to unlocking your phone so you can use it on other cell networks).
Dial *2 for Sprint customer service :-)No comments
First things first!
This is a tutorial on how to rip DVDs you own and not how to steal movies!
That said, there is a legitimate need to be able to take DVDs you own and turn them into files that can be streamed/played, installed on your iPod or iPhone, or used with an AppleTV or other media device. This is a tutorial on how I do it for one of my clients along with a script I customized to make the whole process easy.
The set-up I have for one of my clients is a central Mac Mini server (headless – no keyboard/monitor/mouse) which we use for the iTunes server. It runs iTunes all the time and does not do much of anything else. We have a number of AppleTV’s on the network and each of them is paired with the iTunes library on the Mac Mini server. This set-up allows my client to play/stream any music or movies in the iTunes library on any AppleTV. This works well for their purposes.
The issue I needed to solve for my client was to make it easy to rip all of their media/content into iTunes. Automating the music ripping was easy as iTunes has built in preferences for automating the ripping of music. Just go to iTunes preferences and tell it to rip a music CD when one is inserted in the Mac Mini and when complete, eject it. Done.
But what about DVD movies? Read more7 comments
Just like you can get 6 AAA batteries from the inside of a regular 9V battery and 8 watch batteries from one of those expensive 12V garage door opener type batteries, looks like you can also tear apart one of those huge lantern batteries and get 32 AA batteries from the inner guts! I wonder if this is more cost effective?No comments