Fullpage Screenshot in Firefox

Firefox has a powerhouse suite of Developer tools that comes standard. Among them is the ability to take a screenshot of the whole page!

First, enable the feature. Press ‘Ctr+Shift I‘ to display the Developer Tools. Click on the Gears icon, scroll down to tick ‘Take a screenshot of the entire page’

Then, whilst on any page, press ‘Shift+F2‘ to call up the command line interface, and type ‘screenshot –fullpage‘ then Enter.

A fullpage screenshot of the page will now appear in your Download directory!

Dual Monitor Tool

Shout out to this free, open source project Dual Monitor Tools.

I often have my ThinkPad connected to an external monitor, and recently I’ve needed to move the mouse cursor across the two screens back and forth regularly – that is a lot of traversing!

So a search on whether I can ‘teleport’ the cursor from one screen to another using a keyboard shortcut resulted in Dual Monitor Tools. And it works brilliantly!

Don’t get scared by the amount of features; just use the DMT Cursor tool to add shortcut keys for how cursors operate. I use ‘Win + z’ as the shortcut key to ‘Move cursor to next screen’ – which is the ‘teleport’ feature I was looking for – and I also have ‘Cursor movement between screen is sticky’ as default so there’s a bit of resistance when manually traversing between screens (and hence precision at the monitor edges).

character level diff merge in Windows

And in Chinese – which is different to word level differences since doesn’t have Chinese identifiable spaces like other European/all? languages.

WinMerge, Meld Merge and Kdiff3 can all identify character level differences, but are all unable to merge individual instances found in the same line (or even in adjacent lines for some weird reason).

Beyond Compare seems to be the only one that can, although its user interface requires a bit of getting used to, perhaps because its so feature-rich.

Cost money though.

Update: I was too quick to claim Beyond Compare has this ability. It works for the “adjacent lines” case, and I jumped the gun; multiple differences within the same line cannot be merged individually 🙁

best mobile travel china

Apple iOS is by far the best phone to travel with in China if you are a foreigner. FaceTime works. iMessage works. App Store works. On any ol’ local wifi.

Android devices, on the other hand, can’t download any apps unless you sideload/preload a local app store. And OpenVPN doesn’t work well at all 🙁

scroll zoom Windows 10 touchscreen problem

Can’t seem to find anything online about this: how do you achieve zoom of a map in a browser (but not browser zoom) using a touchscreen in Windows 10?

This particular problem presents itself with jinjianginns.com, when one tries to perform a map search (grey button on main site). The map view has no + or – to zoom out or in with, and the intuitive thing to do on a PC is to zoom with the scroll wheel on the mouse.

You can blame it on the UI. But I think this is another instance of Windows 10’s immature touch capabilities. Can’t get it to work even with Microsoft Edge.

shout to zoho

Zoho Mail has an incredible feature that allows you to bring your own domain, create email addresses on that domain, and send & receive emails using their web client – all for free if you just have the one domain!

This is great for SOHO users who want to supplement their free web hosting with a more official looking email than the prevalent superaccountant92@gmail.com or trustyplumber75@hotmail.com

 

online video advertising

I’ve been playing around with a low-powered Windows 10 device (Atom X5-Z8300 with 4GB RAM), and noticed an interesting/annoying behaviour: ads in online TV shows really taxes the CPU. And these are shows played from major networks’ (Australia) own websites!

Whenever the actual show is playing, the CPU hovers around 50-55%. But as soon it switches to an ad, the CPU shoots up to around 95% and fluctuates wildly. Suffice to say, the ads stutters on screen and the whole browser goes unresponsive for a few moments.

It befuddles me to think why non of the major networks demand their ad suppliers to optimise this better. There are times when I give up watching the show because of the ads. And there are even times when the flash player would get stuck waiting for the ad server to respond.

You invest in all this infrastructure, optimisation and copyright deals to make the TV shows available on your website, only to be foiled by the ads that were suppose to generate the income that makes this whole thing worthwhile. That would be ironic. And idiotic.

microsoft curveballs

First SQL Server for Linux from a few weeks ago, now Bash for Windows 10 from Microsft Build this morning. Really unexpected!

I’m not a developer by any stretch of the imagination, but with the little I do, I think Bash would be useful. Even though Cygwin is good, something baked into the OS just feels right. (And it befuddles me why certain really basic packages are not installed by default in Cygwin; I guess I’m not power user enough to appreciate the customisability).

To be honest, I like developing in Windows. I feel its more manageable than Linux and less restrictive than OS X for development.

aeneas vagrant

Trying to get aeneas-vagrant in VirtualBox on Windows 7 to run has been a bit of a trial-and-error nightmare. Even though many tools in this toolchain are open source and cross platform (supposedly), Window’s idiosyncrasies and strange incompatibilities occurred at multiple points.

Below are the instructions of how I got this to work on an AMD processor (certain issues encountered along the way may be due to an AMD bug!) running Windows 7 Enterprise 64 bit (yes, lets just be super explicit, because 32bit and 64bit mattered in the case of getting Cygwin to work with everything else!)

  1. Install Vagrant (legacy build 1.5.4)
  2. Replace curl.exe in c:\HashiCorp\Vagrant\embedded\bin with this version of curl
  3. Install Cygwin (latest 32bit build), make sure to install ssh and rsync packages.
  4. Git download aeneas-vagrant as per the project readme
  5. (edit Vagrantfile included with aeneas-vagrant directory and add ‘config.vm.boot_timeout = 3000’. This was necessary for my aging AMD processor to not timeout).
  6. Open Cygwin, navigate to aeneas-vagrant directory, input ‘vagrant up’.

Vagrant will do a whole host of things, including downloading a distro debian/jessie64, setup logins and ssh private keys, rsync some folders, bring up the virtual machine with debian/jessie64 into, and then do a whole heap of downloads and setup within debian (colour should be green by this stage). But this will end in an error in debian: something about lxml failing because gcc can’t find a library -lz

  1. Input ‘vagrant ssh’ to log into debian.
  2. Once in debian, input ‘sudo apt-get update’ (this’ll take a while)
  3. Input ‘sudo apt-cache search zlib’ (this’ll bring up a whole heap of results)
  4. Input ‘sudo apt-get install <results-that-looks-the-best>’ (I picked ‘lib32z1’ & ‘lib32z1-dev’ for the <results>)
  5. Input ‘sudo pip install aeneas –upgrade’

Voila! aseneas-vagrant should be now setup and working. Try the instruction of running aeneas as per the project readme, it should finish executing.

However, the shared drive between VirtualBox and your Windows PC will not work just yet. This means you can’t access the output of the aeneas process (which is in VirtualBox) from your PC. And unfortunately debian can’t mount VirtualBox drives (type vboxsf) without some more configuration.

  1. Insert ‘config.vm.synced_folder “./data”, “/vagrant_data”‘ into the Vagrantfile included with aeneas-vagrant directory. This links ‘data’ directory on your Windows PC to /vagrant_data in debian.
  2. Create ‘data’ folder in the aeneas-vagrant directory
  3. At aeneas-vagrant directory in Cygwin, input ‘cygdrive/c/HashiCorp/bin/vagrant.exe plugin install vagrant-vbguest’ (using ‘vagrant plugin install vagrant-vbguest’ generates a SSL error; something to do with the vagrant shellscript not using the right executable; so we specify directly the right vagrant.exe).
  4. Input ‘vagrant up’
  5. Input ‘vagrant ssh’ (now in debian)
  6. Input ‘sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions usr/lib/VBoxGuestAdditions’
  7. Input ‘exit’ (back in Cygwin)
  8. Input ‘vagrant reload’

Now everything should work. ‘vagrant ssh’ into debian again and input the command ‘python -m aeneas.tools.execute_job ../../usr/local/lib/python2.7/dist-packages/aeneas/tools/res/job.zip /vagrant_data/’ – this should generate a zip file in /vagrant_data/ and therefore in aeneas-vagrant/data on your Windows PC.

Acknowledgement: couldn’t have troubleshoot this without the contributors in the following forums:

  • https://github.com/mitchellh/vagrant/issues/5016
  • https://github.com/mitchellh/vagrant/issues/4073
  • https://github.com/mitchellh/vagrant/issues/4073
  • https://github.com/mitchellh/vagrant/issues/3341#8
  • https://github.com/mitchellh/vagrant/issues/5091
  • http://stackoverflow.com/questions/9979870/installing-zlib-in-linux-server

windows 10 tablet mode annoyance

Having tried a Surface Pro 3 for both work and leisure, I’ve come to the conclusion that Windows 10 is more schizophrenic than being 2 great superheroes in 1.

For work: I couldn’t work out how to access the desktop in Tablet Mode. And that is significant because the desktop is a shortcut space for me to access folders and short-term files (e.g. PPT to show at the work conference).

And for the love of everything sacred you cannot find anything online because ‘desktop’ happens to be the name of other Mode in Windows 10 – so any search just returns oodles of results about the ‘great’ feature of being able switch between Tablet and Desktop Mode.

For leisure: as previously mentioned, Windows 10 doesn’t pop-up the onscreen keyboard for Firefox (yet) automatically; sure, not entirely the fault of Microsoft, as Mozilla probably hasn’t updated Firefox to be fully conformant to Windows 10 – but still, its annoying.