Skip to content

Emojis in a MySQL database

A while back, I’ve had issues when user input contained an emoji: the database field would then cut after (and including) the first emoji). My table seemed to be configured properly for Unicode though, so that was a bit puzzling.

It turned out that “utf8“, in MySQL/MariaDB language, doesn’t actually mean the real, proper UTF-8: it contains a MySQL-specific limitation preventing use of characters numbered above 0xFFFD (source, with also a comparison between utf8mb4_unicode_ci and utf8mb4_general_ci). So you’ll want to use utf8mb4, which is the real deal and will store emojis without issue.
The good news is, if you already have an utf8 database or table, the migration may be as easy as just switching the column types (still you should make a backup first, just to be safe), at least for me it was. You might want to have a look at this first, though: How to support full Unicode in MySQL databases.

While looking into this, I also found some stuff about utf32. Not sure if I’ll ever use it but here it is for bookmarking purpose.

Sorry that was once again a brief post, I’m cleaning up my tab groups because after Firefox decided to kill the feature, they now also killed the extension that tried to continue the feature… Thanks again Mozilla! ๐Ÿ˜ก

Posted in web development.

How to generate a file of a specified size on Windows

The command is:
fsutil file createnew [filename] [size in byte]

Note that it doesn’t generate random contents: the contents is all zero bytes. If you want a random file, you can use something like Random Data File Creator, or encrypt a zero file that you generated with fsutil (I find AES Crypt pretty convenient for that purpose)

Posted in Windows.

How to get rid of Music.UI.exe

Lately (maybe since last month), I’ve had that Music.UI.exe executable, located in C:\Program Files\WindowsApps\Microsoft.ZuneMusic_3.6.19261.0_x64__8wekyb3d8bbwe, regularly (like, every few hours) popping up in my firewall, trying to access the network ๐Ÿ˜ฎ Every time, I denied it and killed it, but it kept coming back.

I tried deleting the file, with no success (permission denied, even as admin).
I eventually found the solution: go to Settings > Privacy > Background Apps, and turn off Groove Music. While you’re at it, you might want to disable the shitload of other apps that are there too.

Posted in Windows 10.

How to prevent Windows 10’s auto volume reduction?

Sadly this time it is still an open question.
Whenever there’s a system beep sound, Windows 10 automatically lowers the volume of everything else for a pretty damned long while (maybe 5-10 seconds). This is particularly annoying when trying to adjust the volume, as adjusting the volume will itself generate a beep, causing the volume to be automatically reduced (WTF were those engineers thinking when then did that? :o).

Anyway, apparently this could be caused by Windows trying to be smart and “guessing” that you are using VoIP, and then reducing the volume of other activities so that you can hear your communication better. The solution, as I found there for instance, would be to disable that feature, by going to system sound settings, then in the “Communications” tab and choosing “When Windows detects communications activity, do nothing” (the default is a huge “reduce the volume of other sounds by 80%” :o).

Sadly, for me it didn’t do the trick, even after a restart (which was suggested there).

I’m running out of ideas to fix this (already), so if you have a magical solution do post it in the comments ^^

Off-topic bonus: apparently Windows 10 comes with an annoyance called Xbox DVR, which doesn’t seem to be necessarily linked to owning an Xbox and can fuck up performance in some games. Steam provides a guide to disable it there.

Posted in Windows 10.

aToad #23: Dan’s Tools

Lots of little development-related tools

This time it’s not one tool but a pretty large collection of tools. I found Dan’s Tools while looking for a Unix timestamp to date and time converter (or the other way around), but the site also have many other helpful little (or not that little) things, such as:

  • HTML formatter
  • Javascript formatter and minifier
  • JSON formatter, minifier and validator
  • PHP formatter
  • Python formatter
  • Ruby formatter
  • SQL formatter
  • CSS sprite generator
  • Regex testing
  • SHA-1 hash generator
  • URL encode/decode

… and some more. Quite a tool belt ๐Ÿ™‚

Posted in A Tool A Day, programming.

My Visual Studio Code config file (TypeScript-oriented)

Just to find it easily whenever I switch computer, my Visual Studio Code user settings file (for TypeScript development):

    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "typescript.check.tscVersion": false,
    "typescript.disableAutomaticTypeAcquisition": true,
    "files.exclude": {
        "**/*.js": { "when": "$(basename).ts"}
    "": "none",
    "git.enabled": false,
    "git.path": null,
    "git.autofetch": false

It should be quite self-explaining in most part, but what these settings do is:
– disable telemetry and crash reporter
– disable checking for mismatch between VSCode’s TypeScript and the globally installed TypeScript (which gives a pretty annoying warning that can’t be permanently dismissed and shouldn’t be a problem if you update everything regularly)
– disable Automatic Type Acquisition (ATA)
– hide .js files when a .ts file of the same name exists
– disable auto-updates
– disable Git integration (probably the 3 settings I used are a bit redundant though), although in the end I reactivated it because it’s pretty convenient to spot which lines you recently edited

Posted in JavaScript / TypeScript / Node.js.

How to move Livedrive’s cache folder

In its older versions, Livedrive had many “advanced” settings. Notably, it was possible to move around its cache folder (which is the folder where, notably, files are temporarily stored while they’re being uploaded to the briefcase, or permanently if you choose to keep them both locally and “in the cloud”), which I found quite useful so as to avoid filling up, or simply wearing out the SSD where Windows resides. Sadly, the new, redesigned version came with many oversimplifications, and this setting was removed. However, I noticed that my upgraded version did retain the modified value from the previous version. So I dug around a little, and found there is a registry setting for it ๐Ÿ™‚

So, simply run regedit, then go to key HKEY_CURRENT_USER\SOFTWARE\Livedrive\Users\[your email], and edit the string (REG_SZ) value CacheLocation. Default value is C:\Users\[username]\AppData\Local\Livedrive. Make sure Livedrive is not running when you change that. Also, I think it’s a good idea to manually move the contents of the cache folder from the old location to the new one.
On a side note, it seems that all settings are stored in this key: it might be a convenient way to modify them without looking everywhere in the control center.

Posted in software.

aToad #22:

Online Markdown editor

I’m really not a fan of Markdown, as I’ve been used to MediaWiki syntax, BBCode, or even more simply, plain HTML (HTML is so trivial, I don’t really get why so many people feel the necessity to invent their own markup language over it…). But with Github’s quasi-monopoly on easy Git hosting (I personally like Bitbucket though – but they use Markdown too) it seems to become kind of a necessary evil. provides an easy way to edit your markdown readmes, with a simple and efficient interface: code to the left, “what you see is what you get” (just a non-editable preview) on the right. It lacks a syntax help, but the provided example document already has plenty of the useful syntax and you probably won’t need more than that.

Posted in A Tool A Day.

How to disable Vivaldi’s disk cache

I recently changed computer, and in the process I manually migrated some stuff, notably my browsers’ data folders (if you’re looking for them, they’re usually located in C:\Users\[username]\AppData\Local or C:\Users\[username]\AppData\Roaming). To speed up the transfer as those USB keys can be quite slow when dealing with many files, I packed them each in a 7-zip archive. And I noticed Vivaldi’s folder was huge. Like, 1+GB huge ๐Ÿ˜ฎ

It turned out Vivaldi inherits from a behavior inherent to Chrome and forks, which is to stuff its cache in the same main folder as your profile. Or more specifically in:
C:\Users\Admin\AppData\Local\Vivaldi\User Data\Default\Application Cache and
C:\Users\Admin\AppData\Local\Vivaldi\User Data\Default\Cache

Of course, I didn’t really want to transfer those. So I looked for a way to disable disk cache (I’ve got RAM for fuck sake, use it you stupid damned browsers), then emptied those folders and transfer the profile without the cache.

Sadly, Vivaldi doesn’t provide an easy option to turn off disk cache (comparatively, in Firefox and forks you just need to go to about:config and set browser.cache.disk.enable to false). You need to launch it with the --disk-cache-size=0 command like option. So basically, edit Vivaldi’s shortcut so that the target becomes something like "C:\Program Files\Vivaldi\Application\vivaldi.exe" --disk-cache-size=0. Source is here.

Note that this actually doesn’t totally prevent that annoying browser from junking said cache folders: I usually have about 350 MB of stuff in those folders. Hopefully some day it will be cleaner…

Posted in Chrome/Chromium/Vivaldi, Firefox.

How to get rid of Intel(R) System Usage Report

This executable, who also apparently goes by the nickname of “Energy Server Service WILLAMETTE” or SystemUsageReportSvc_WILLAMETTE (located, by default, in C:\Program Files\Intel\SUR\WILLAMETTE\ESRV), is installed along with the Intel(R) Driver Update Utility. And it appears that you cannot prevent its installation when you install that update utility.
The problem is, it will keep running in the background, and try to send mysterious data to who knows who (Intel, I guess). That’s actually how I caught it: it popped up a firewall alert. Some people also reported CPU usage issues, with the executable (esrv_svc.exe) eating up a whole CPU core.
You can try to disable it in your Services configuration, however in my case it still kept running after I disabled its service! So the only option left for me was to uninstall the Intel(R) Driver Update Utility, which is much useful once you’ve figured out precisely which drivers you need anyway.

Posted in Intel.