Copy/paste internet code kills. Runtime comments on .net development, SharePoint WCM, and software engineering
Saturday, 30 May 2015
Wordpress SSL causes 404 for images
All was going well apart from a niggling problem with images not displaying on the site itself (anonymously) or logged into the WP dashboard. Inspecting the image HTML in Chrome allowed me to extract the full problem URL and I found I could load the image successfully in its own window. Chrome also allowed flagged the 404 response for images when loaded through the Wordpress page. Weird.
Apart from images I uploaded to the Media library, other images being served locally from my Wordpress installation (e.g. theme thumbnails) were also failing to load.
I found that by changing the site address (again in WP > Settings > General) to http:// (not https://) the images would display so I came to believe the problem was somehow related to SSL. Interestingly, after changing this setting, the images appeared when I browsed to either the http:// or https:// site. Images on the http:// site using absolute image references to the https:// site also worked.
After a bit of head scratching and a bit of searching around (this problem doesn't seem to be particularly common), I came across this page which suggests hotlink protection can cause problems for the SSL protocol. Apparently "HTTPS is configured correctly when resources that are available via HTTP are also available via HTTPS." As far I could tell, my images were available through both HTTP and HTTPS but I had enabled hotlink protection on the site before installing Wordpress.
Sure enough, disabling hotlink protection solved the problem.
Thursday, 28 May 2015
Windows Live Writer and Blogger returned the following error: Notfound: not found
Apparently Google is also considering a fix at their end, which would be great to keep us bloggers running in the meantime: https://plus.google.com/u/0/+RickDoyle/posts/GUPJcu5sZHo
Update: a few workarounds have popped up around the web:
- View source in WLW and copy/paste into Blogger (web). See http://mybeerbuzz.blogspot.com.au/2015/05/blogger-windows-live-writer-blogger.html
- Configure posting by email. See http://www.hackinguniversity.in/2015/05/live-writer-not-found-error.html
Tuesday, 31 March 2015
How to recreate a windows folder and file structure with empty (zero byte) files
I have an external drive full content that I reference only periodically. I don’t connect the drive regularly to my laptop but I often want to know if a file is on that drive. I recently thought it would be helpful to have a zero-byte copy of the drive contents on my local machine.
Although I thought about writing a PowerShell script to accomplish this, robocopy includes a feature to do exactly what I want through the /Create command:
robocopy source dest /E /Create
Robocopy has been bundled with Windows since Vista.
Sunday, 15 March 2015
Infix PDF Editor Pro Review
I may have finally found a fully-featured desktop PDF editor that won’t blow the budget (hence this review: Iceni Technology offer a free license for promoting the Infix product). I’m referring to Infix PDF Editor from Iceni Technology.
In the last few years I’ve committed to reducing the volume of physical paper in my house and to that end, I’m scanning existing documents to PDF. As my multifunction device only scans single-sided, I have a need to merge PDFs and reorder pages, at a minimum. On occasion I’ve also had a need to edit the PDF content—the text within the PDF.
To date, I’ve used a hybrid solution for manipulating PDFs including the CutePDF Writer to print documents from other applications to PDF and the free, online CutePDF Editor for manipulating and combining PDFs. Although the Cute printer is great, the Editor product is painfully slow, especially when reordering pages and joining PDFs. Plus, I’m not terribly comfortable uploading sensitive (private) PDF documents to an unknown web server.
The obvious benchmark for PDF editing is Adobe’s Acrobat and I installed a trial version of the Acrobat XI product. It worked amazingly but the price tag is also amazing—over $400.
Finally, I’ve integrated third-party PDF solutions into my web applications in the past, notably WebSupergoo’s ABCpdf.NET product. I was literally just about to write my own PDF editor using their product when they pointed me to Infix.
I’ve previously searched high and low for free PDF editors (open source or otherwise) but found very few products that meet my primary requirements:
- Desktop-based for performance and security reasons
- The ability to merge PDF documents
- The ability to reorder PDF documents (preferably graphically)
- No watermark
- No dodgy adware or crapware
Most of the merge and reordering features I require aren’t available in freebie products. The closest thing I’ve found previously was a product called PDFill, which works but is really only a basic Windows application with a fairly painful UI.
Enter Infix Pro (v6.36). The Professional pricing is $159, I see and the evaluation version will, unfortunately, watermark your files. For promoting the product, however, you’re eligible for a free license.
I’ll reserve final judgement about the watermark until I’ve received my free license but from the evaluation I can see all of the requirements I list above are met.
The application is an .exe install that installed no other programs as far as I can see. No browser extensions or toolbars, no random stuff. I wasn’t prompted to install anything else either. The download was not quite 60MB and the application itself is responsive and fairly intuitive. I’ve read other reviewer’s comments about the toolbars being of the older Windows style (not a ribbon) but the application still works fine and most functions are easy to find and use.
Merging two (or more) documents is easy and I was surprised that by default the program allows me select other file types (as in not PDFs). I tried to join a .tiff to a PDF but this failed, understandably, with an appropriate error message that I was trying to merge a file that isn’t a PDF. I have tried merging other file types.
Reordering is semi-graphical: you can’t drag and drop pages to reorder them but you make a current selection and then reorder through the Document > Pages > Re-order menu. There is no shortcut noted for this operation and right-clicking on the current page itself or the thumbnail offers no option to reorder the page. In short, reordering multiple pages might get a bit painful but at least it’s quicker than the slow, web-based CutePDF Editor I’m used to.
I’ll be giving this product a thorough workout once I can get rid of the watermark but so far it looks like a pretty good bet.
Monday, 5 January 2015
Root redirect to www
Something changed in relation to the root redirect I previously had in place and I only just realised (my domain host, Planetdomain, is now owned by Netregistry so I attributed it that change initially but I suspect Google may actually be at fault here). In any case, mediawhole.com was not redirecting automatically to www.mediawhole.com and was coming up with a 404 or something equally boring instead.
I thought I’d need to mess around with DNS records at Netregistry to fix this but in actuality it was a simple as typing “www” into a text box in the Domains section of the Google Apps admin console. Google refers to this as redirecting the naked domain and provide suitable instructions on the process. In my case I didn’t need to configure A records as they were already in place.
The root mediawhole.com domain redirects efficiently, automatically, and as you might expect.
Update: this simple fix stopped working (or perhaps never worked in the first place) and I recently noticed my bare domain was no longer redirecting. Back to Google admin and I followed the instructions to add new A records to the DNS config in Netregistry (specifically, I added four new A records—one for each IP address noted by Google).
The Netregistry UI is awful for this task: Google suggests using @ for the name value but using @ or “.” or anything else in Netregistry didn’t work for me; I ended up leaving the Name field blank and setting only the Host field as the IP address. This created a new record with a “Record name” of mediawhole.com.
Thursday, 13 November 2014
Create a bootable USB drive
After so all these years I’ve never booted a machine from a USB drive—or, more specifically—had the need to create my own bootable USB drive. I’d just burn an ISO to DVD and call it done. Since I keep all of my ISOs for, like, ever, and tend to hang on to the DVDs “just in case” I’ve got a lot of crap lying around.
I’ve been on a mission to de-crap my life lately.
I also made two coasters today when a Windows Server 2012 ISO failed to burn successfully. Since I don’t like plastic, a better solution was required.
I opted to use Rufus to have a go at making my first bootable USB drive and it worked exactly as advertised. There’s no install required, which I like, and no extra Microsoft prerequisites to locate and install. I popped a big enough USB drive into a port, Rufus detected the insertion, I left the defaults as they were, selected the .iso file to use, and a few minutes later it was all finished.
On the target side (i.e. the computer I was booting with the USB drive), I did have to fiddle with the boot settings in the BIOS slightly to not only enable the machine to boot from USB but also make it extra aware of my intentions. You know what those BIOS developers can be like—your system will be specific so I won’t include the gory details.
Saturday, 8 March 2014
How to configure Hyper-V to use a wireless connection in Windows 8.1
I haven’t used Hyper-V for a while but when I recently built a Windows 8.1 test bed VM I needed a virtualisation platform and Hyper-V was more or less ready to go within my Windows 8.1 host laptop.
The only hiccup I encountered along the way—and one I was familiar with from my days running Windows Server 2008 on my laptop simply so I could run Hyper-V—was configuring Hyper-V to make use of my laptop’s wireless connection. This time I followed Rick Gipson’s excellent post to get everything working and I summarise/condense his steps here in the interest of preservation and to document a few notes relevant to my Win 8.1 environment. Check out Rick’s post for screenshots.
- Create a new Internal virtual network switch named Virtual WLAN from the Virtual Switch Manager in Hyper-V Manager. A new Unidentified Network connected to vEthernet (External WLAN) will now be visible within the host OS’ Network and Sharing Center. Note I renamed this connection to vEthernet (External WiFi) in Windows to reinforce its relationship to the wireless adapter and differentiated it from the Hyper-V object.
- In Hyper-V Manager, configure the target VM’s network adapter to use the newly-created virtual switch (i.e. Virtual WLAN). Note Rick suggested the need to add a new Legacy Network Adapter but I found this was unnecessary.
- In the host OS’ Network and Sharing Center, share the host’s physical WiFi adapter by checking the Allow other network users to connect through this computer’s internet connection box and specifying the Home networking connection as vEthernet (External WiFi). Note Rick’s screenshots show the Home networking connection field as a drop-down list but my current configuration displays as a text field. The WiFi adapter should now be listed as Shared in the host OS’ adapter settings.
- Start up your guest VM when you’re connected to a wireless and enjoy network connectivity including internet access.
Sunday, 23 February 2014
Lightroom Touchpad Scrollbar Fix
Lightroom and Synaptics touchpads (trackpads) don’t seem to play well together but climbbike1 at the Adobe forums posted a registry fix that worked for me.
I’m not sure what it does, but as stated the little scrollbar graphic that was popping up wherever my mouse was positioned no longer appears after applying this fix (a good thing as it seems to be related to the problem). I was having a similar problem with a few other apps I rarely use under Windows 8.1 and didn’t have the problem when using a proper mouse. Note the Control Panel –> Mouse applet/Synaptics tab reports that I’m running Synaptics Touchpad V7.2 on PS/2 and Device Manager states the Driver Version as 15.0.24.0 (I just installed the latest driver when building the Windows 8.1 machine).
Here’s how to implement climbbike1’s fix.
Option 1 – edit the registry directly:
- With administrative rights on your Windows computer, run regedit.exe (either via Start –> Run or the search charm in Windows 8)
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTPEnh
- Right-click the SynTPEnh key and select New –> DWORD
- Name your new DWORD UseScrollCursor
- It’s value should be set to 0
- If the key already exists when you complete step 2, modify the value instead
- Restart the Synaptics processes (see below)
Option 2 – create and run a .reg file:
- Open notepad and save the blank file to your desktop as fixscroll.reg (or whatever you want to call it)
- Copy the italicised text below and paste it into your .reg file
- Double-click the file to run it (with administrative rights)
- Note I’m not sure if this will create the key if it doesn’t exist—follow the steps in option 1 to confirm it exists and is set correctly
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTPEnh]
"UseScrollCursor?"=dword:00000000
Restarting
You’ll need to restart a couple of Synaptics processes and can do this by either restarting your computer or following these steps:
- Open Task Manager
- Locate and end the Synaptics TouchPad Enhancements (SynTPEnh.exe) and Synaptics Pointing Device Helper (SynTPHelper.exe) processes
- Restart those same processes by running them from your startup folder or locating the executables and double-clicking them
Lightroom was running while I made these changes and the fix had instant results—no need to restart Lightroom or Windows.
Tuesday, 14 January 2014
High-Key Black and White Process
After reading about how to do spectacular black and white conversions in Australian Photography (June 2013), I thought I’d give it a spin. I chose the photo as a sacrificial test snap because the focus was off and the two subjects (my wife and little girl) were looking away from the camera. Despite these ‘defects’ the response from friends and family has been strong and I’ve come to love this photo, appreciating the focus as a private, shared moment between wifey and baby. Here’s how I did the conversion in Lightroom (v5.3).
In the Develop module:
- Adjusted white balance of the original colour photo
- Changed the Treatment from Colour to Black & White (first option above white balance in the Basic panel)
- Increased the Exposure (+1.79)
- Increased the Contrast (+100)
- Decreased Highlights (-7)
- Decreased Shadows (-38)
- Decreased Whites (-10)
- Decreased Blacks (-100)
- Increased Clarity (+29)
- I should have modified the colour channels (HSL/Color/B&W sliders but did not during my first edit—what you see below)
- Added a graduated filter to the top 75% of the image to further reduce exposure and highlights and increase shadows
- Sharpened
- Added a not-so-subtle vignette which works well with the black and white
- Cropped square
Wednesday, 27 November 2013
Setting the Default Search Provider to Google in IE
I’ll forever struggle to remember how to configure Internet Explorer 11/10/9/etc to use Google and not Bing when searching from the address bar. Sure you can add providers from the Manage Add-ons menu but it never seems to work for me as the list of search providers that appears on the IE Gallery site—when clicking through from IE itself—doesn’t seem to include Google.
Instead I follow this URL in IE, click the button and tick all the boxes on the popup:
http://www.iegallery.com/en-us/Addons/Details/813