tag:blogger.com,1999:blog-39374299253138437212024-03-06T10:44:28.731+11:00Twig's Tech TipsMainly notes to future-Twig (and for anyone else who may find them useful)twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comBlogger866125tag:blogger.com,1999:blog-3937429925313843721.post-75092787743529262682023-06-21T16:59:00.006+10:002023-06-21T16:59:55.149+10:00Windows / Nvidia: How to reduce GPU usage for Instant Replay when idling on desktop (without disabling it for games) The other day I was glancing at Task Manager and noticed something annoying...For some odd reason, the GPU was busy at around 40% capacity while I wasn't really doing much on the desktop.After a bit of sleuthing, it turns out the "Instant replay" feature is constantly recording and encoding in the background, which is a pretty cool feature for gaming but a waste of power for my day to day twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-74904982173713772682022-03-08T16:28:00.002+11:002022-03-08T16:28:38.315+11:00Remove URLs next to links when printing from browsers like FirefxSometimes you need get something done quick like printing a receipt off a webpage, but the browser just vomits URLs all over your print preview.I've yet to figure out why this happens, but some sites will go the extra mile to make your life difficult.What you see:What you didn't expect:Now to get rid of the extra URLs, paste the following into the browser Javascript console. Try pressing F12 to twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-24378166500944976732021-07-01T21:45:00.002+10:002021-07-01T21:47:05.475+10:00Typescript: Preventing generic string keyed objects from overlapping with Arrays This was a bit of a doozy and took me the better half of a day to find a semi decent fix for it.Here's the unsuspecting use case and why it caused problems (try it out on Typescript playground)
SingleConfig and MultiConfig are different types. One is a single object value, the other is an array of that.conditionalReturn() returns either one of those depending on the twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-59647627832567534442021-02-10T20:33:00.000+11:002021-02-10T20:33:15.922+11:00Android: How to disable Chrome's useless share menu (aka the "Chrome Sharing Hub")Note: this flag should also work on Chrome derived browsers such as Brave and Vivaldi.It's frustrating when a company like Google tries to be all user-friendly up in your face by adding extra steps to what used to be a simple workflow.Before:Click share buttonChoose app to share toAfter:Click share buttonScroll through horizontal list of apps (which has no visual clue to indicate that you can twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-59785670744054133472021-01-10T20:59:00.000+11:002021-01-10T20:59:05.308+11:00Android: How to figure out which key store your app was signed withIt's been more than a few years since I've signed an APK for release and over time I've forgotten which key store I used to sign apps.Fortunately, if you've got Java installed then you already have everything required to verify this information.Step 1 - Acquire the APK(s)Grab the APK file off Google Play Console (it's in "App Bundle Explorer" > "Downloads").If its a publically published app twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-20995829049421976792020-09-14T22:01:00.001+10:002020-09-14T22:01:08.487+10:00Keeping your commit history while migrating from SVN to GitI had to finally get off my arse and migrate my old SVN repos over to Git(hub) when CloudForge decided to close shop. It was very nice of them to host my junk for free all these years and also give us plenty of notice about turning off their services.But alas, the migration path. I had always envisioned this to be painful and tedious. Luckily it was neither due to the wonderful work by the peopletwighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-30672752121566761042020-08-22T21:24:00.000+10:002020-08-22T21:24:31.695+10:00How to turn off Google's single sign-in popup adsI hate it when sites have popups telling me to click things. It's enough of a pain that GDPR has mandatory banners on almost every site, but Google's overly clingly popup is something that has got to piss off.I opened up 3 sites today looking to buy something in particular and all 3 sites showed me the same fucking popup to sign in with my Google account. No thanks, you're just wasting screen twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-84668625723754427642020-02-14T21:03:00.000+11:002020-02-15T01:03:33.823+11:00How to get Android Studio Emulator working properly with Ryzen on Windows - actual instructions that don't suckI recently built a new Ryzen computer and felt like getting back into Android development for some personal apps. Got Android Studio up and running without any major issues, but the emulator wouldn't run without HAXM (which doesn't work on AMD processors).
Intel HAXM is required to run this AVD. HAXM is not installed.
Install Intel HAXM for better emulation performance.
So one of the first twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-82143062071536768242019-10-29T22:20:00.001+11:002019-10-30T11:52:26.635+11:00VirtualBox: Cloning a physical drive (HDD or SSD) to VDI on WindowsOpen up Partition Manager on Windows to find your "disk number"
Open up a Command Prompt and type:
VBoxManage.exe convertfromraw \\.\PhysicalDrive2 C:\output.vdi --format VDI
Replacing "2" with the drive index you want to clone and changing the output location to whereever you want.
That should be it!
Update:
VBoxManage creates a full clone, meaning the image will take up as much space twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-27821058847073793092019-09-09T16:41:00.002+10:002019-09-09T16:41:27.150+10:00Fix slow link clicks in Microsoft Office (Word, Excel, Powerpoint, etc)When working with a spreadsheet with roughly 90 rows of links, I got frustrated with a 1-3 second delay when clicking on each link.
The cause
For those who don't have Internet Explorer as their default browser (who in their right mind would?), Office has implemented a workaround which does a request internally to check the response before opening the link.
This internal request also handles twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-22109260860161873522019-03-03T23:17:00.000+11:002019-03-03T23:36:00.626+11:00Getting native Linux terminal on Win10 WSL (Windows Subsystem for Linux)(Wow, it's been a while since I've written anything! Since Open Live Writer doesn't seem to be working anymore, I had to venture back into writing straight in the browser. Dammit Blogger it's still awful)
After upgrading to Win10 1809 (the infamous November 2018 rollout) and updating to the latest WSL Ubuntu build, I noticed a bunch of issues with my ConEmu/WSL setup.
Vim wasn't navigating as twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-59954673761408583132018-07-26T09:58:00.001+10:002018-07-26T09:58:44.606+10:00Getting Python 3.6 build tools working on WindowsWhat an annoying process this has become. Used to be "download this exe, install and carry on". Didn't bother with Python 3.7 since a lot of libraries were breaking on Linux. Downloads Grab Microsoft Visual C++ 14.0 standalone: Build Tools for Visual Studio 2017 (x86, x64, ARM, ARM64). Setup Run vs_buildtools.exe Wait for it to download a bunch of files for "Visual twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-87526913238681130942018-05-23T00:29:00.001+10:002018-05-23T00:29:19.214+10:00Python: comparison of pipenv vs pip-toolsNow this isn't a blog I would have normally written up here since the stats in this post were only meant for my colleagues in an internal email update. But I noticed some emotional messages in recent discussions regarding pipenv and a distinct lack of solid information about it's actual merits / benefit as a tool. To me software development should be factual, much like maths and science. You twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-67712470811421409912018-03-21T12:15:00.001+11:002018-03-21T12:15:21.310+11:00Getting Font Awesome v5 (Pro) to work with yarn on multiple dev machinesFontAwesome is pretty much the defacto standard icon library these days. First of all, you'll need your NPM token from your Accounts > Services page. Following the instructions on the FontAwesome docs (and substitution npm with yarn) you get: yarn config set @fortawesome:registry https://npm.fontawesome.com/YOUR-TOKEN Unfortunately this will set the config variable @fortawesome:twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-78260579837124068722017-03-10T21:01:00.001+11:002017-05-23T08:49:35.552+10:00Easily Integrate React.js to a Django Website for dev and production buildsAssuming you already have a Django website up and running, this will get you started with compiled React.js on the front-end with: Django and Webpack integrated nicely together during development and deployment Support for React.js code in your website Packaged and obfuscated Javascript code SCSS support Proper sourcemaps for dev builds Hot reloading of (S)CSS changes during twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-87604833255780597622016-11-16T19:13:00.000+11:002016-11-16T20:31:36.716+11:00Samba File Server: Stop files from being set with executable bitWhile doing a bit of code cleanup today, I found some files which were marked as executable even though they weren't meant to be. As I looked around at the files affected, a colleague did some snooping on git and found out why it was being set. "Err Twig, I think it's you". After double checking the git logs, yep it was me. How embarassing! Preventing the stupid setting twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-80306744208481925552016-10-19T10:27:00.001+11:002016-10-19T10:27:39.111+11:00cPanel / WHM: How to redirect sub-addressed (plus addressing) emails to your inbox folderFor a few months now, my inbox has been pretty quiet. I thought that the war on spam is finally over, but then I noticed that my regular cron job emails weren't being received either. I checked and disabled all my email filters, nothing strange there. I disabled all my spam checks. Nope nothing there too. Without many other options, I contacted my web host and they said it seemed fine. I sent twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-1322519291054568922016-09-22T13:43:00.001+10:002016-09-22T13:44:42.590+10:00Fix Windows 7 getting stuck on "Checking for updates...", high CPU usage or installing updatesSo my friend's computer has had issues with getting updates since day 1. I didn't really know why, but at the time a lot of the responses online was to leave it running overnight and hope for the best. Eventually, my computers became victim to the same issue. For months, Windows Update would get stuck on the "Checking for updates..." or hang when trying to download the updates. It twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-80444630178260631112016-08-29T23:10:00.001+10:002016-08-29T23:11:45.329+10:00Android: Fix for YouTube "There was a problem while playing. Tap to retry" - Videos Stop Playing After a Few DaysThis was an annoying issue plaguing me for the past year or so. I don't know exactly when it started happening or why, but there are numerous posts and issue trackers for it scattered around the internet without a solid fix. The problem The official YouTube app suddenly decides to stop working about 2 days after rebooting the phone. There's no real information available (as a user) to figure twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-3775544284387750202016-04-16T21:39:00.001+10:002016-04-16T21:41:05.846+10:00Sony Z5 Compact: Root without losing TA partition (DRM features) on MarshmallowI've spent too long on Android without root access and it really bothers me. I need it! Feeling imprisoned by my own Android OS... I did not sign up for iOS! Overview In order to back up the TA partition (where the DRM keys are stored) we need temporary root access via the iovyroot exploit, which is only available on a Lollipop build. This part is optional if you don't care about that twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-63106382951267263462016-03-11T15:45:00.001+11:002016-03-11T15:47:05.140+11:00Git: Post-merge hook to detect when certain files have changed and display a notificationWhen certain files in a project change, the project needs to be rebuilt/restarted/recompiled. Using the following git hook, you can keep an eye out for changes in certain files then display a reminder message to perform an update or just make it run the command automatically. It's just a simple bash script that's executed by git after a successful merge. Use check_run() to run the script twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-56680226289872315882016-01-13T00:36:00.001+11:002016-01-13T00:36:21.830+11:00How to safely downgrade your Old/New Nintendo 3DS to firmware 9.2.0-20Assuming you're on firmware 9.3 to 10.3, then you can downgrade to 9.2 using the following method. Download starter.zip (aka the "homebrew starter kit") Download sysUpdater.zip Download 9.2.0-20X firmware for your console (Replace X with E for Europe, U for US and J for Japan) I can't link you the firmware download links, but I can tell you how to find it. Google for &twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-44734749536199198012016-01-06T23:37:00.001+11:002016-01-06T23:37:23.614+11:00nginx: How To Set Up an SSL Reverse Proxy (Windows / Linux)So you have a program on your computer that's running a HTTP server, but you want to add HTTPS support to it to prevent people from snooping on your activity. Fortunately, that's pretty easy to do. Downloads nginx openssl (for Windows, mine came with cmder) Installing nginx Pretty straight forward. Windows: Download, extract and open command prompt there Linux: Add repo, update twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-89017729336043195132015-12-25T22:40:00.000+11:002015-12-25T22:40:30.604+11:00Android: 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 twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.comtag:blogger.com,1999:blog-3937429925313843721.post-6798571491491195362015-12-16T12:32:00.000+11:002015-12-16T12:33:37.177+11:00Firefox 43: Disable check for "unverified" add-onsThis 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 twighttp://www.blogger.com/profile/12960052797537632822noreply@blogger.com