Screen within a screen within a screen
If you have nested screen sessions, and you need to get out of the innermost screen session, I found the following command particularly useful:
CTRL-a, a, d
Ugly shell scripting
Recently I developed a strange wear pattern on my car’s front passenger side tire (that’s front rightside tire for those driving on the “wrong” side”) – the outer surface of the tire was warn almost completely bald while the inside treat was fresh and meaty. This was rather odd, as I recently had the car re-aligned with zero toe and max negative camber, which comes out to around -1.6 on both sides. Later I found that as a result of this slight adjustment, I had been pushing the car a lot more aggressively while driving to and from work. The downside of this, as I retraced my steps, is that my drive home from work is almost entirely left turns. When coupled with the fact that I had been recently pushing the car very hard on these left turns, it made sense that I had worn out just the outer edge of the tire.
Since the car is AWD, I didn’t have the option of just replacing that one tire as the difference in tread levels can be harmful to the AWD system. Now here comes the difficult task of finding a single Bridgestone Potenza RE-960/AS Pole Position tire in 225/45/17 so it can be shaved down and mounted.
After some searching I came upon the website BestUsedTires.com – but searching for “Potenza 960″ yielded the tire in all sizes but the size I needed. Now, since I’m lazy, how would I automate this search and have my computer notify ME instead of having to manually check every day for the tire I needed?
How to update the PRL on your HTC Touch Pro 2
What is this PRL file do? It’s the Preferred Roaming List, and it’s a database that your phone uses to pick which cell phone towers to use, and which towers to consider “Roaming” and “Home”.
With modern cell phone plans in the US, we rarely have to deal with “Roaming” charges, but this term is used just to refer between towers owned and operated by your service provider (Sprint, Verizon, Alltel, US Cellular, etc…) and towers that your service provider doesn’t own but has roaming agreements to.
Updating your PRL updates which towers your phone can access, and can help with signal strength in areas where you have fringe coverage. This is usually due to changing roaming agreements between cell phone service providers, so keeping the PRL updated can improve consistency and coverage if you are in an area that does not have very good coverage.
Here is what you need in order to update your PRL:
- Your phone
- A registry editor for your phone
- A MicroSD card reader/writer, or the USB cable for your phone
Here are the step-by-step instructions on how to update the PRL on your Sprint HTC Touch Pro 2.
- Get a .prl file for your provider (Sprint, in my case) – I used this thread [ppcgeeks.com] and save it to your MicroSD card root
- If the PRL file you downloaded is zipped, you may need to unzip it to get the .prl file.
- You will need your MSL code for this next step, if you don’t have it, here is how to get it:
- Get a Windows Mobile registry editor tool like CeRegEditor [free!].
- Go to HKLM\Software\HTC\ATDbgLog
- Edit item called “Enable” and change from “0″ to “1″, and save your changes
- Reboot your device
- Go back to the registry editor and change the setting back to “0″
- Reboot your device
- Open File Explorer and go to the folder “\Atlog” in the root directory of your device.
- You should see a file called “ATDbg0″ (the “0″ may be another number like 1).
- Open the file and locate a line containing “RMSL”
- You should find a line item that includes a 6 digit number, this is your MSL code. Write it down
- Open up the phone dialer application and enter this combination: ##775# – you do not need to hit “Send”, it will automatically enter a hidden menu after you enter in that combination.
- It will ask you for your MSL code, enter it in now.
- Select “Menu” then “Edit”, and find where you have extracted the PRL to. It should be on your MicroSD card.
- Select the PRL file and hit “OK” twice
- Your phone should now prompt you to reboot. Go ahead. After the phone boots up, you can dial ##778# to verify your new PRL!
Online image editing
If you’re using a computer that is otherwise not your own, and need a good image editor to do a little photo manipulation, I’ve always found Pixlr to be a great stopgap between that full install of pirated Adobe Photoshop! (aaaaarg!)
Joe Nemechek at HostGator Houston
Snapped off some shots in the morning before I came home
mod_pagespeed and WP Super Cache issues
Dreamhost recently showcased their mod_pagespeed “switch” that was made available for all of their hosting customers, so I took a stab at enabling it. Most of my websites run WordPress which already isn’t exactly the quickest CMS so I figured I could use all the help I could get to make the pages load quicker.
One plugin that many WordPress users, myself included, use is called WP Super Cache, which basically caches your website as HTML instead of PHP to minimize processing delays in displaying your website to your visitors.
One option that the plugin gives you, is to gzip compress the HTML to send to the viewers. At this time, it looks like using mod_pagespeed and enabling the “Compress pages so they’re served more quickly to visitors” option in WP Super Cache will break your website. I’m not sure at the moment why this is, but if I have this enabled, both FireFox and Chrome error out when loading websites with a content encoding error, saying the content encoding on my website is incorrect.
On a side note, once that option is turned off, mod_pagespeed works great!
Anyone else having this problem?
Fuzzy Dice
You have two standard three-dimensional cubes, each with six sides. On each side, you are allowed to inscribe one number. How do you represent all the ~31 days of the month, if each of two cubes have exactly the same six numbers inscribed on each side?
Edit: if you’re reading this syndicated on facebook, twitter, whatever, please post the answer as a comment on http://andrewpeng.net
cphulkd locked you out of cPanel/WHM?
Here’s a handy set of instructions that you can use if you accidentally got yourself banned or locked out of the cPanel/WHM login interface due to repeated failed login attempts. This assumes that you have access to the server’s command line and root access to the MySQL server, and will clear the IP address blacklist and the locked user accounts list.
First log into your server, and select the cphulkd database:
mysql cphulkd;
Now you want to clear the IP address blacklist:
DELETE FROM `brutes`;
After clearing the IP address blacklist, you might want to also clear the account locks so you can log back in:
DELETE FROM `logins`;
An alternate way of gaining access back to the server is to add YOUR IP address into the whitelist:
INSERT into `whitelist` values (123.123.123.123);
Now you can exit the MySQL command line, and it should all be back to normal!
quit;























