Android: Fix for TextView.setTypeFace() not working on Android 5.x+ (Lollipop/Marshmallow)

This is one of the latest quirks I've had the displeasure of running into while upgrading an old app to the latest Android 6/Marshmallow.

The problem happens when the font fails to apply onto a TextView even though it loaded via Typeface.createFromAsset() without any errors.

Because I haven't worked on this app in many years, the problem has gone unnoticed until now.

Fortunately it's quite an easy fix and there is no need to change any code. What you actually have to do is pass the font file through the converter at http://www.freefontconverter.com and update the font file.

Easy. So, so easy.

Sources

Firefox 43: Disable check for "unverified" add-ons

This is a bit of a temporary fix because it won't work for Firefox 44, but for the time being you can simply change a setting in your config editor.
  • Open up a new tab and go to "about:config"
  • Paste in xpinstall.signatures.required and set it to false
Restart the browser so the disabled addons are re-enabled.

I'll update this post with methods to self-sign the addons once Open Live Writer is patched to work with Blogger's OAuth2 sign-in API.

Source 

Firefox 43: Disable the useless "Visit" in awesomebar autocomplete dropdown

This has got to be one of the most useless features in Firefox as of yet. Apart from disabling unsigned addons that is.



Fortunately, easy enough to disable.
  • Open a new tab
  • Type in "about:config"
  • Paste "browser.urlbar.unifiedcomplete" into the filter
  • Double click to toggle it to false
  • Done!

Source

How to Resize a VirtualBox partition (example with Ubuntu LVM2 PV)

Initially when I created the VM I thought would be temporary. It turned out to be not so temporary.

I thought I could just get away with using GParted and resizing the blocks around, but it turned out to be more tricky than expected.

Preparation

BEFORE YOU DO ANYTHING,

MAKE A BACKUP OF YOUR VIRTUAL DRIVE!

  • Make sure the VM is off
  • Find the VDI file for the drive
  • Make a copy of it

 

image

For example sake, here's my 10gb guinea pig.

Expanding the size of the drive

In your host, you have to run some commands to increase the capacity of the drive before you can do anything with partitions.

Use a calculator to calculate how much space you want to allocate in MB.

For reference, 100GB = 1024mb * 100 = 102,400mb

In command prompt, run these commands:

  • cd %PROGRAMFILES%\VirtualBox\
  • VBoxmanage modifyhd "path\to\your.vdi" --resize 51,200

This will only increase the capacity of the file itself.

You can check it in the VirtualBox VM details page, but it's not actually accessible yet.

You still have more work to do.

image

Lo and behold, I am now 50. Oh wait I'm not, I just look it.

Create a new VM which uses LiveCD

I used a copy of LinuxMint and configured it for Live CD usage. This was purely because I already had the ISO on hand. If you don't, you can save yourself the wait and just grab a GParted LiveCD from their website.

  • CD/DVD drive: LinuxMint or GParted ISO file
  • HDD: Select the VDI drive you want to resize

Using GParted

  • Once you're in GParted and can see the HDD, you'll notice there's a whole lot of free space now
  • If it's locked (there's an icon of a vault), right click and select "Deactivate"
  • Resize the partition (you may need to do this in multiple steps in order to get the right structure)
  • Apply changes
  • Shut down GParted VM

image

Remember to test the "resized" partition before continuing!

  • Load up your normal VM
  • Test that it boots and operates as normal
  • Check the amount of space remaining with df -kh

image

Extra steps for LVM partitions

If you're not seeing the space show up in df results, to make that space accessible to the partition you'll need to run two more commands.

The MOUNTPOINT for my VM was "/dev/mapper/ubuntu--vg-root"

  • sudo lvextend -l +100%FREE MOUNTPOINT
  • sudo resize2fs MOUNTPOINT

First command expands the LVM while the second resizes the filesystem.

coxGG

Now, are you sure that you don't have too much space?

Sources

Android: Fix Black Areas in Shape Drawables

When I first experimented with LayerDrawables, I thought something was broken in the way I was loading drawables and initialising the LayerDrawable.

image image

Here's what it looks like on Android 4.1 (API 16) and Android 4.4 (API 19)

For each background and border, I had a drawable defined in XML files. Upon testing the layers individually, the background was loaded fine, however the border drawable was causing the black from appearing.

Here's an example of "cell_border_event.xml" shape drawable:

<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="@color/cell_border_event" android:width="3dp"></stroke>
</shape>

It seems that for Android 4.1 and lower, the shape drawables require a definition for the solid colour attribute. Prior to Android 4.4 the default was black.

<?xml version="1.0" encoding="utf-8"?> <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Android 4.1 renders this black if this isn't specified -->
<solid android:color="@android:color/transparent" />
<stroke android:color="@color/cell_border_annual" android:width="3dp"></stroke>
</shape>

After adjusting this for all the border shapes, it now looks consistent.

motulmen0rs

Eh, looks about right to me.

Source

Git: List and remove all remote branches which have already been merged

Sometimes you need to do some spring cleaning on your remote branches (such as GitHub).

To hell with doing it manually!

Fortunately it's an easy fix for us lazy sods.

List all remote branches which have been merged into master

git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print}'

Remove all remote branches which have been merged into master

git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print} | xargs git push origin --delete

Digging-Like-a-boss

It just works.

Source

Homebrew via themehax / homemenuhax / menuhax on New 3DS

The 3DS homebrew scene has been flourishing lately. I never bothered with Ironhax and was too lazy to get around to trying out Tubehax, so now that Tubehax has been patched, the only other way left for New 3DS owners to get onto homebrew is via themehax.

This will work on any 3DS, Original or New from 9.x up to 10.3.0.

*update 12/01/2016* Now supports up to 10.3.0 and updated instructions as theme/home hax is now known as menuhax.

Downloads

Setup

  1. Disable any custom themes on your 3DS by changing it back to default. menuhax does not work with it enabled (you can change it later)
  2. If you were you were using Tubehax before, set DNS back to auto.
  3. Extract the contents of the homebrew starter kit (starter.zip) to the root folder of your (micro) SD card.
  4. Safely remove your SD card and put it back in the 3DS.
  5. Turn on your 3DS and make sure internet is enabled.
  6. Launch the Internet Browser app.
  7. Enter in http://yls8.mtheall.com/3dsbrowserhax_auto.php
  8. IMG_20151019_223117[4] IMG_20151019_223145

  9. Click on menuhax installer
  10. Press A to install. It'll download some stuff.

    IMG_20151019_223314
  11. Once it's done, it should say "Install finished successfully." and tell you to press START.
  12. It'll boot back into Homebrew launcher.
  13. Now you're homebrew startup ready!
  14. Press start > A to reboot back into your 3DS.
  15. Disable the internet and turn off your 3DS.

How to use it?

When you start up the 3DS, hold the L button before the screen turns on.

It should kick you into homebrew mode right away.

Check out 3dbrew.org to check out some more homebrew apps.

I recommend blargSNES so you can have SNES games on the go, without cartridges!

Removal

The homebrew process is completely safe so you can revert at any time by removing the same files you added from your SD card.

Sources

Django: "AppRegistryNotReady: Apps aren't loaded yet" error after upgrading from 1.6 (to 1.7 or 1.8)

Depending on your setup, this might be a troublesome one to figure out. You won't see any error emails coming through since it doesn't hit Django code yet, just 500 error page when trying to view the website.

With the changes to the WSGI code in Django, some of us may have forgotten to update the WSGI dispatcher which is needed to glue our project to the HTTP server.

To fix the error, you'll need to open up your WSGI dispatcher file and change the following lines:

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

to

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

That should ensure that everything is smooth sailing again.

KFWNVz8

Source

Easily Migrate Blogger / Blogspot comments to Disqus

It used to be a really simple process; click a button on Disqus admin, log into blogger, and then comments are migrated. But Disqus was left with a broken import link when Google deprecated some of their APIs. Given that it's been broken for a while, I didn't see that being fixed anytime soon.

So, I finally got some time to roll my own fix based off a bit of code I previously wrote. Now that it's been tested for a few weeks, I've decided to make it public.

This is a multi-step process but doesn't take more than a few minutes each to set up.

Exporting your existing comments

  • Go to your Blogger admin and then find the settings item on the left menu.
  • Under that, look for "Other settings"
  • Click "Export blog" at the top.
  • Save the backup file somewhere.

I don't blame you for having trouble finding it. Below is a screenshot of where to click.

image

Converting your comments to WXR

What you have now are comments in some God-awful XML format which you'll need to convert to Wordpress WXR format, one that Disqus can import.

You can either use my online "Blogger to Disqus comment converter" tool which uses django-disqus, or (if you don't trust me) check out the source and run it yourself.

Setting up Disqus

This part is fairly straight forward.

  • Create a Disqus forum for your site.
  • Go to the admin and then the Discussions tab
  • Click Import
  • Select the Generic tab
  • Upload the converted WXR file
  • While you wait, continue with the setup below.

Setting up Disqus on Blogger

Now that the import process has started, there's just one more thing left to do on your blog. While you wait for the import to complete, set up the Disqus plugin on your blogger so the old comments don't show anymore.

There is a page on Disqus that lets you quickly add the plugin to the site of your choice.

Click on this link and then:

  • Click the "Add <disqus forum name> to my Blogger site" button (Step 1. You can ignore step 2 because we already did that)
  • Select a blog you wish to use Disqus
  • Click "Add widget"

Supporting Internet Explorer users

For those who wish to support Internet Explorer users, there is an extra step involved.

Check the source of your blog and search for "X-UA-Compatible" and check that it's using "EDGE". If it's not there or it's not showing "EDGE", Disqus has a decent tutorial written up here on how to add it into your Blogger template.

And that's the end of that! The Disqus widget on Blogger will handle the rest.

scream

You're finally done!

Sources

MariaDB / MySQL: How to vacuum your deleted database (shrink size of ibdata1 file)

After checking out the data from a well known leak, I realised that MySQL poorly handles the deletion of databases and that the default configuration doesn't make it very easy to vacuum the obsolete data.

(5.6 changes the default so it's better, but still an issue)

Have no fear, twig (and the internet's collective knowledge) to the rescue!

  • Get a list of all databases on your server

SHOW DATABASES;

  • Make a backup of all the data. You're going to need it. You can skip internal databases information_schema, mysql, and performance_schema.

mysqldump -u root -p database_name > database_name.sql

  • If you're lazy you can just use this instead:

mysqldump -u root -p --all-databases > everything.sql

  • Now drop every single table EXCEPT for the internal databases; databases information_schema, mysql, and performance_schema.

DROP DATABASE database_name;

  • Now terminate the server process.
  • Open up my.cfg or my.ini (Windows)
  • Under "mysqld", add in "innodb_file_per_table". This changes the setting so the information for each database goes into a separate file.
  • From your MySQL data directory (MySQL\5.5\data or /var/lib/mysql/), delete the ibdata1 and ib_logfile* files.
  • Restart the MySQL service.
  • Log back into the SQL shell and create each database again.

CREATE DATABASE database_name;

  • And finally, reimport the data.

mysql -u root -p database_name < database_name.sql

Once again, thank you technology for keeping me up way past my bedtime. Hopefully this has helped you avoid the situation I'm in right now... Looking for suitable gif animations can be hard, but I've found a photo that's surmised how I feel about the way MySQL has been built.

1484391_10153354869076264_2873289967254645255_n

Sources

Firefox 42: How to install unsigned addons on dev/nightly builds

While it's a major improvement on the more sluggy Firefox builds, it does however add a slight inconvenience for developers by restricting addon installations to signed ones. In my case, it was Firebug 3 alpha.

image

If you find yourself needing to install an unsigned addon, you can quickly do so by:

  • Type "about:config" into your address bar
  • Confirm OK "I'll be safe"
  • Filter to find "xpinstall.signatures.required"
  • Double click it to set the value to "false"

You shouldn't need to restart for this to take effect. Try installing the addon again, it should work this time.

image

Source

Fix for installing unsigned add-ons in Firefox Dev and Nightly

Windows: Uninstall "Get Windows 10" notification tray icon

It's nice that Microsoft has gone out of it's way to promote their new operating system, but I would have greatly appreciated a "don't remind me again" option.

Right clicking it didn't show anything useful either.

image

After checking "Windows Update" history for recent updates, lo and behold I found KB3035583 "Update enables additional capabilities for Windows Update notifications in Windows 8.1 and Windows 7 SP1", which is a sneaky way of saying advertisement.

How to get rid of it?

  • In Windows Update, click on "Installed Updates".

image

  • Sort it by date and find KB3035583 under "Microsoft Windows".

image

  • Select it and click uninstall.
  • Click yes to confirm.
  • Once it's done, reboot for it to take effect.

PUBLISHED by catsmob.com
Next time Microsoft, please don't surprise me in the wrong way.

Setting up Xiaomi / XiaoYi Small Ants Intelligent Camera (Home IP Camera) for security monitoring

I love this little device already, but it's a bitch to set up because of the occasional language barrier + no clear English instructions oh how to get started.

For those wondering it's this device on the left, NOT the Xiaomi Yi Go-Pro style camera on the right.

  

http://www.xiaoyi.com/images/c-17.jpg               http://www.ibuygou.com/images/upfilepic2015/201532103838827.jpg

*update 10/01/2016* Rewrote most of this tutorial:

  • custom firmware which removes password on stream
  • include setup of iSpy
  • majority of the app instructions are now in English!

Downloads

I went through the trouble of finding the APKs and saving them online for future use so you don't have to. But if you're anything like me and don't trust random downloads, then here are the links to the official sources.

At time of writing, there is a firmware N release but I found M much more stable when it comes to WIFI connectivity.

Hardware

While you're waiting for downloads, I suggest removing the camera from the stand to make it easier to access cables and sd cards.

Oh and this guide will require a micro-SD card.

Installing firmware manually and enabling RTSP without authentication

The device I had came with a old firmware which did not work with the setup app. I had to update it in order to use the camera at all.

  • Grab your micro-SD card and format to FAT32 (if it isn't already)
  • Open up the root folder of your SD card (eg. X:\ where X: is your USB drive)
  • Extract the contents of "1.8.5.1M_201512011815.zip" and move it to X:\
  • Extract the contents of "1.8.5.1M_test-rtspfix-4.zip" to X:\
  • image
  • Safely remove the card from your PC and put it into the camera
  • Plug the camera in to power it on and begin the upgrade process
  • After flashing orange for a few minutes, it will speak to you once done (scared the crap out of me when I heard it)
  • Wait until the orange light is flashing and turn it off.
  • Remove the SD card and restart the camera.

Setting up the camera

Before starting, make sure the camera is OFF until needed.

  • Download and install the "Yi Home App" APK onto your phone. At time of writing, it's International v2.20.1.0 (20151210) / Chinese v2.10.0.7 (20151224).
  • Log in with your Xiaomi account (or one of the various other accounts supported). If you don't have one, sign up via the app and activate via email validation.
  • Swipe right until you see a picture of a dog and "Let's get Started".
  • Click on the top-right (+) button to add a camera.
  • Now plug in the camera and wait until the light is flashing orange (If it flashes blue, reset the camera with a pin at the back while it's on. If you need help finding the reset button, click "I did not hear it")
    • Chinese version: Set it up via the QR method
    • International version: Pressed "I have heard waiting to connect" when you hear something in Chinese coming from the camera.
  • Enter in your WiFi details so your camera can connect to it.
  • Enter it in and click next.
  • Put your phone in front of the camera so it can scan the QR code on your phone. This may take a few attempts. I found that moving the phone towards the camera works well.
  • You'll hear it say something in Chinese once it scans the QR code.
  • While setting up WiFi, it'll flash blue.
  • Once you're on WiFi, the blue light will stop flashing.

At this point, the camera setup is finished for home monitoring.

If you only need to monitor using a PC via iSpy, then you can skip to the section "Testing Connectivity".

If you want to finish setting it up with your phone:

  • Click "Next" on the app and wait for the phone to connect to the camera.
  • You should now be able to use your IP camera!
  • If you ran into any problems connecting, see the section below

coeUe
... for all sorts of security monitoring!

Stuck on "Connect to Camera - Please wait 2-3 minutes"

You'll get an option "app and firmware mismatch" if it takes too long and the app can't connect to the camera.

The phone switches to a QR scanning mode and you'll have to take a photo of the back of the camera to debug the cause.

The two won't pair if the camera is the Chinese model and you have the English app. Make sure you have the rigth app!

You can get the right app version from the Yi Camera blog and more information about why it doesn't connect.

Testing Connectivity

As long as the WiFi works, you should be able to access the camera via IP without use of any apps.

To test if the camera is accessible via WiFi:

  • Find it's IP by visiting your router settings page
  • The camera should be listed under "antscam1"
  • I can't provide settings for this as each router brand has a different way of finding IPs.
  • Once you have the IP, open up Video Lan Client.
  • Go to File > Open network stream
  • Paste in rtsp://CAMERAIP:554/ch0_0.h264 and replacing CAMERAIP with the IP of your camera (eg. 192.168.0.1)
  • Click Play

imageimage

Configuring iSpy for home monitoring with motion detection

Now for the grand finale, getting the camera to sit and wait until something moves.

  • From the toolbar, click Add > IP Camera with Wizard
  • Type in Xiaoyi and select "Xiaoyi: Ants Camera"
  • image
  • Click next
  • Click next again to skip password input
  • Enter in your CAMERAIP and click next
  • There should be one feed for the camera, no need to scan for more so click No
  • image
  • Select the first option and click Finish

Now you're gonna be able to see what's coming out of the camera via live stream. It also opens up the camera configuration panel for you to edit options straight away.

Things I suggest changing are:

  • (Camera) Max framerate: Change from 10 to 20 (for recording as well)
  • (Camera) Tick "Ignore audio" because the quality is horrible anyway (unless you remove the mic filter)
  • (Recording) Select "Record on movement detection"
  • (Recording) Quality: Full
  • (Recording) Profile: AVI with MPEG4

And that's it!

image

When it's all ready, just click on "All on" to activate recording mode and "All off" to stop it.

Do the same for any other cameras you may have and be ready to watch... EVERYTHING!

WulvfiE

Sources

Kodi / XBMC / uTorrent / EventGhost / TheRenamer: Automatically renaming downloads for Kodi consumption

Kodi expects your files to be organised in a certain way if you want it to be displayed correctly. This isn't a big ask, but most people are incapable or lazy, so it'd be nice if it could be done automatically.

At the moment this handles movies and TV shows just fine, but anime renaming is a whole different can of worms needs a little more work.

This method relies on a particular setup, but your setup is similar then it'll work for you. If your setup is similar, then you can easily adapt it.

update 10/01/2016: Made the process work better with anime.

Basic process

  • When files are added to uTorrent, categorise them with a label (movie, TV show, anime, etc)
  • uTorrent completes a download and moves it your "completed" folder but also appends the label. (eg. C:\Downloads\Movies\)
  • EventGhost monitors the labelled folders for media files and copies them off to a temporary folder (so you can continue seeding)
  • When the file has finished copying to the temporary folder, EventGhost will start TheRenamer to rename and move the files to it's final resting place
  • Next time Kodi starts, it'll scan and detect the new files

For the time being, anime is copied to a temporary folder but no renaming is done.

Downloads

Setting up your computer

You'll need 3 sets of folders, one for completed downloads and one for temporary downloads.

For example:

  • C:\Downloads\Movies
  • C:\Downloads\TV Shows
  • C:\Downloads\Anime
  • C:\XBMC-prepare\Movies
  • C:\XBMC-prepare\TV Shows
  • C:\XBMC-prepare\Anime
  • C:\XBMC\Movies
  • C:\XBMC\TV Shows
  • C:\XBMC\Anime

Ensure these are ready before continuing.

Setting up uTorrent

  • Options > Preferences
  • Under "Directories", ensure that you set the "Move completed downloads to:" to a specific folder
image4
  • On older uTorrent clients, you'll have to check "Append the torrent's label to the directory name" as well
  • (optional) Under Advanced > UI Extras, fill in the persistent labels "Anime|Movies|TV Shows" so you don't run into inconsistent label names

uTorrent and Anime

The difference with anime is that it's a pain in the butt to get working because of the naming convention compared to TV Shows.

  • Set up the filename scanner as shown http://kodi.wiki/view/Anime#Scanning_files_without_renaming_them here by pasting the snippet into advancedsettings.xml.
  • In uTorrent, name your labels as "Anime\One-Punch Man" and such so that the name matches the name you want to match in the scraper (anidb or thetvdb)
  • That should be enough to get you by. Specials and movies will probably require a change of scraper or involve manual renaming.

If your anime (one off movie) doesn't belong in a folder, then you can simply label it as "Anime" and the script will still work.

Setting up EventGhost

image14

To the right is an image of the setup you should replicate in EventGhost.

Preparation

  • Click "Add plugin" in the toolbar
  • Select Other > Directory Watcher
  • Select the folder "C:\Downloads\TV Shows" and tick "Watch subdirectories too"
  • Do this again for Movies and Anime
  • Now under Autostart, you should have "Plugin: Directory Watcher" "Autostart" #2 and #3 (note this for naming for events)
  • Select "Configuration Tree" at the top
  • Click the "Add macro..." button in the toolbar
  • Select "Event Ghost > Python Script"
  • Paste in the following content:

This part took the longest because of the finicky nature of events and the EventGhost UI. A few people have contributed to the original script by Pako, but many of the solutions had flaws which made it unworkable for larger files (longer copy times). After months of trial, I've figured out the ideal script to handle most use cases without problems.

Note: Make sure the variables at the top of the script are correct for YOUR setup

    • ALLOWED_TYPES
    • DESTINATION_FOLDER
    • THE_RENAMER
  • When done, rename the new macro to "Copy Video Files"

For each media type (Movies, TV Shows, Anime)

  • Select "Configuration Tree" at the top
  • Click the "Add macro..." button in the toolbar
  • When asked to choose an event to add, select "EventGhost > Python Command" (not Python Script!)
  • For the statement, enter in: mediaType = "Movies" (or "TV Shows", "Anime" etc)
  • Select the macro and rename it to "Copy Movies" (because the default is just silly)
  • Now right click your macro and select "Add event"
  • Type in "DirectoryWatcher.Created" and click ok (Note: For Movies or Anime, use DirectoryWatcher2 or DirectoryWatcher3 accordingly depending on the order you created the plugins)
  • Now right click your macro and select "Add action"
  • Change "If" to "Always"
  • Select "EventGhost > Jump" and select "Copy Video Files"
  • Repeat these steps for TV Shows and Anime if needed

Phew, that's it for EventGhost!

Setting up TheRenamer

Last piece of the puzzle is quite a useful tool. However, the UI isn't the most intuitive so I'll have to guide you through that part. I forgot which mode TheRenamer starts in, but you can switch between "TV Shows" and "Movies" modes by clicking on the middle of the screen as highlighted.

Settings for the current mode is always in the top-right corner.

image37

TV Shows

For TV shows, set it up as shown. This configuration makes it very easy for XBMC to parse your content when organised as "C:\XBMC\TV Shows\Show Name\Season 01\Show Name S01E02.avi".

image31

The important parts are:

  • Renamed format: s1e01 ticked
  • Fetch folder
  • TV shows archive (destination folder)
  • Moving File Structure: TV Show Folder ticked

Movies

For movies, it's much simpler. All you really need is "Movie Name (Year)" and it'd be enough to scrape correctly.

image36

The important parts are:

  • Fetch folder
  • Movies archive (destination folder)
  • Auto move
  • The brackets around the year format

Kodi / XBMC scanning

Whenever Kodi starts up it should scan for new media files. I forgot if this was enabled by default or not, but it's definitely something I would consider setting up after all this.

TV shows and movies will work out of box with The Renamer doing its job correctly.

However, anime will need a little tweaking to read the format correctly.

  • Open up "%APPDATA%\Kodi\userdata\" in Windows Explorer and find advancedsettings.xml
  • If it doesn't exist, download this file and save it there. Then you're done.
  • If it DOES exist, copy in the contents from http://kodi.wiki/view/Anime#Scanning_files_without_renaming_them into it into the right location under the <advancedsettings> tag
  • Save and restart Kodi
  • Anime files should now detect without need for renaming

20DQV7U4
Automation, it's a beautiful thing... when it works.

Sources

ConEmu / Cmder : How to select text by left double-click and triple-click

I got used to using double click to copy a word and triple click for a line after using Putty for so long. When I switched to Cmder/ConEmu, selecting text was absolutely painful because of this missing feature.

I did a quick search online and found a bunch of Google Code tickets regarding this functionality from 2013-14, but no real solutions. Fortunately, I spotted a comment by ConEmu.Maximus5 which stated the functionality is already built into ConEmu!

After looking through the settings SEVERAL TIMES because it's so cluttered and oddly named, I eventually found the setting to enable text selection by double-click and triple-click.

double triple click

By default, this behaviour is restricted to only when the ALT key is held. For what reason? I don't know, but fortunately you can change it.

  • Go to the settings dialog
  • Keys & Macro
  • Mark/Copy
  • Ensure that "Block (rectangular) selection" is enabled
  • Change the modifier to "<Always>"

The changes should take effect immediately.

image

One thing that ConEmu settings would really benefit from is a better settings screen.

Sources

Android: Use Facebook messaging without Facebook Messenger

Facebook's app checks for the existence of the Facebook messenger app and if not found disables the messaging capabilities on your Facebook app. That's a bit shit because I have no interest in installing that invasive, bloaty app which demands access to almost every part of my phone.

Screenshot_2015-05-02-11-59-13 eBQNoiZ
Facebook: Once they're in, you're screwed.

Fortunately for me, I found a post on XDA forums where nemoc23 figured out that all you needed to do is create a dummy app which pretends to be "com.facebook.orca" and Facebook messaging will work again.

So, steps to install it are:

  • Go to Settings > Security & Privacy
  • Make sure you have "Unknown sources" enabled
  • Go to Settings > Apps > Facebook
  • End/terminate the app, confirm yes
  • Clear the data, confirm yes (this also clears cache for you)
  • Download "Messenger.apk" from XDA (footer of the first post)
  • Open it and install it
  • (recommended) Turn "Unknown sources" back off
  • Open up the Facebook app and log back in

You'll need to go through your settings to customise notifications and stuff, but at least now you've got messaging capabilities back in the one app!

Source

Windows: How to disable WinSat.exe (System Assessment Tool)

So I was coding away at 1am on Sunday (as night owls would) and suddenly my computer switches off Aero and goes crazy with CPU usage, causing heat hot enough to cook an egg and the fan to go absolutely ballistic.

I checked out the cause and it turned out to be WinSAT.exe started up on it's own and decided to max out one of the cores. Turns out this is a task it runs periodically to rate the computer's performance.

Well, I personally don't need this and odds are you won't either.

To turn it off:

  • Start > Task Scheduler (taskschd.msc)
  • Find Task Scheduler (Local)
  • Task Scheduler Library
  • Microsoft > Windows > Maintenance
  • Right click WinSAT
  • Select disable.

1196

Enjoy the full use of your computer again.

Update Your FreeDNS.afraid.org Dynamic DNS and specify IP Address

When running behind proxies or VPNs, the Dynamic DNS auto-updater in your router or computer isn't always able to detect the correct IP address upon update.

This will cause the dynamic DNS to point to addresses which won't route the data request back to the right IP

In order to remedy this, I've created a little Python script which fetches the correct WAN IP from the router and updates FreeDNS with the right IP.

Where can you find your token? Visit the Dynamic DNS page and copy the link for "Direct URL".

Once that's all done, just find a good time to run the script. I find that running it upon startup works well for me.

Source

Windows 10 Technical Preview & Virtualbox: Your PC needs a restart. Error Code: 0x0000000A

At time of writing, I tested this with the latest version of Virtualbox v4.3.22 and Windows 10 Technical Preview Build 9926.

Correct steps to failure

  • Set up the 32-bit virtual machine

image

  • Select the 32-bit technical preview ISO.

image

  • Start it up and watch it burn.

image

  • BOOM!

Your PC needs a restart.

Please hold down the power button.

Error Code: 0x0000000A

Parameters:

0xFFD00000

0x000000FF

0x00000003

0x8158B5E3

The fix for it

This baffled me for some time because I thought VirtualBox was buggy or something. Oddly enough, telling Virtualbox to expect a 64-bit operating system will fix it.

image

image

I'm not sure if this is a bug within Windows 10 (because it worked fine in previous technical preview releases) or a bug with VirtualBox. Either way, hope it gets fixed before Windows 10 gets released!

 

Source

Run Windows 7 on a OSX (Macbook Air, Pro, etc) with Bootcamp

Although the instructions are for Windows 7, the same should apply for Windows 8.1.

Preparing your USB installer

  • Insert the USB you want to use as the "install source"
  • Copy your Windows 7 ISO file to the desktop
  • In the Spotlight (magnifying glass in the top-right corner of your screen), type in "bootcamp"
  • Select "Boot Camp Assistant"

IMG_20150126_194027

  • Click continue to pass the intro screen
  • Select "Create a Windows 7 or later version install disk"
  • Select "Install Windows 7 or later version"
  • It'll automatically select the ISO file for you and the destination disk, but double check it just to make sure.
  • Once ready, click continue
  • Confirm you're OK with wiping the destination USB.
  • Wait ages for it to copy files to USB.
  • At the end of that, it may ask you to plug the Macbook into a power source (if you're running on battery)
  • Now is a good time to ensure that you're connected to the internet. If you don't, it'll make you restart the bloody process because you're not online... Yes, it happened to me first time I tried this. You'll only get a notification with the "OK" button, no retry.
  • Now you'll have to wait for it to finish downloading Windows hardware drivers (about 1GB I think). This will take a really long time as well, so go play Shovel Knight or something.
  • Once it's done, select how much space you want to allocate your operating systems. I pretty much gave as much space as I could to Windows because there's no intention of coming back to OSX.
  • It'll automatically reboot into the Windows setup after it's done resizing the partitions.

IMG_20150126_205229

Installing Windows

This step is pretty straight forward. The only thing you need to make sure is that you format the bootcamp drive appropriately.

  • Select "Custom (advanced)" when you get to the "Which type of installation do you want?" screen
  • Select the "BOOTCAMP" drive
  • Click "Drive options (advanced)" to reveal more options
  • Click "Format"

IMG_20150126_205904 IMG_20150126_205921

  • Give it time to install and prepare Windows. It'll automatically reboot once or twice during that process.

Configuring Windows

Once you're in Windows, there's a few extra steps are involved in making the operating system more tolerable for day to day use.

Assuming you still have the installation USB plugged in:

  • Open up Windows Explorer and go to X:\Bootcamp\ (where X: is your USB drive, labelled WININSTALL).
  • From there you can find the Bootcamp setup for Windows.
  • Run the setup

IMG_20150126_211318

  • This will automatically proceed to install driver software for your hardware such as touchpad, graphics card, motherboard, webcam, etc.
  • It'll need to restart your computer before you can continue.
  • Once you're back in, look for "Boot Camp" in the start menu.

IMG_20150126_212031

  • Once you're in, go to the "Keyboard" tab and tick "Use all F1, F2, etc keys as standard function keys"
  • Go into "Trackpad" and configure the trackpad to your liking. Look at my configuration if you're unsure what you want as "normal" settings.
  • That should be everything needed for you to get up and running with Windows on a Macbook.

 IMG_20150126_212138

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog