My iPhone 5 stopped charging the other day. My employer just upgraded me from the 4 not too long ago, and I knew they wouldn’t be happy with me telling them my new phone wasn’t working. I peeked into the charging cable hole and saw roughly 5 tones of pocket lint within. After rooting around a bit I found the perfect device with which to get it all out.
GUM Soft Pick. Normally I would never, ever support these things. They’re a waste of material, and the ocean is probably littered with them already. I hate – HATE – single use shit like this. But we had a couple laying around from a dentist visit. I snipped off the pointiest bit of one and used the remainder to dig around in my phone (which I’d turned off of course). The rubberyness of the pick grabbed the lint and drug it out no problem.
I got this new printer/fax/scanner/toaster the other day. It’s a cheap home version of an office multifunction copier. So far it’s nifty enough for the price. One giant complaint I found online is people being unable to accurately set the date/time on it, which effects time stamps for emails and faxes. After fiddling I believe I’ve figured it out. It is, perhaps unsurprisingly, completely unintuitive.
Above is the time setup in the web config. You can hit this with it on wireless – no need to have your computer physically plugged into the printer. Set the Current Device Time to actual GMT using the Date field and stupid drop downs for Time. No, not the current time in your zone…. GMT. Check the box for Use the same time zone set on this computer and Apply it. This should make the device subtract or add the correct amount of hours from the GMT setting to correctly time stamp correspondence sent from it. When you return to this page the Current Time will continue to show GMT, not your zone’s time. I know, I know, that’s stupid too. An easy test to confirm things are set up correctly is to go into the scan/email set up and send a test page.
Today at work I had a need to query a bunch of databases for a particular, er, thing, and then send that thing, if found, to myself via email. I needed this to happen every morning. I decided, since we’re talking about a MS SQL and Windows 2003/2008 environment, that Powershell was the way to go. And it was – until I popped it into scheduler.
When executed as a scheduled task, the email didn’t send. Things before and after the email routine worked – the arrays populated, the log file filled – but the email didn’t go. Firing it from a Powershell manually, everything went fine.
Being the stubborn arse I am, rather than get to Googling I started ripping things apart. I had the query dump its results into a temp file that a separately scheduled script would open, parse, email and then clear. Same result: run manually everything worked peachy. Scheduled, no email.
In the end the problem was irritatingly simple. For some reason, when run as a scheduled task the script didn’t keep the socket open to the SMTP server long enough for a successful transmission. I added a Start-Sleep -s 5 right after the SMTP command to give it a 5 second breather before continuing on. Voila – email success. How silly.
I think I’m going to like Powershell just fine. Other than quirks like this, and getting used to the syntax, it’s easy enough – and it seems a lot of Windows specific stuff is streamlined, at least in comparison to my old go-to admin scripting languages.
I hate it when I fail to document. About a year ago I solved a problem I was having on a client site involving customized pages of categories. I didn’t document my solution, and not unexpectedly as the months ticked by it slipped out of my brain. Fast forward to now and I need the solution again. After too much time spent poking at my own mess, I have the solution again.
My problem was this: I want a page that shows all posts of a particular category, and I want the ability to format those posts into a custom view. No links in titles, no thumbnails, etc.
Find the Slug of the particular category you want to display. This is in the Category edit page. Then create a .PHP file named SLUG_page_template.php. Populate the file thusly:
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
$wp_query = $temp; //reset back to original query
} // if ($category)
<?php get_sidebar(); ?>
<?php get_footer(); ?>
On line 9 change SLUG to the appropriate slug of your category. Update this file to represent the changes you want reflected on the category page.
Determine the cat number of your category. This is easily done by going into Categories and hovering over View. Then you can test by going to http://www.yoursite.com/?cat=# where # represents the category. Category pages can also be added to menus easily.
When I created my vmdk for my work virt in VirtualBox I made the mistaken assumption that by “dynamic” they meant the drive size would expand as necessary. What they really meant was that the drive would expand as necessary within the limits of the initial drive size setting – which I stupidly set to 20 gig.
Expanding your vmdk for VirtualBox is really a misnomer. You have to create a new one of the size you want and then clone your old one over to it. It’s a little time consuming, but not hard. Disclosure: My host is running Windows 7 64 and my VM is running Windows 7 32. Why bother? It’s a security thing.
Shut down your VM (obivously)
Within the VirtualBox Manager, open the Settings for your existing VM, then choose Storage.
Add a hard disk to the controller. Make it the same type as your current disk, and make it the size you need.
Once it’s created open a command prompt and head to the directory containing vboxmanage.exe – typically in C:\Program Files\Oracle\VirtualBox\
Run the following, altering the paths to match your current and new vmdk files:
I needed to do this to test Crashplan. I keep my photos archived on an external drive hooked to, and shared off of, my router. Since Crashplan’s client runs as a service under the Service account, this was the solution to get it to see these shares.