Posts

Fix Controller Input When Steam Input Is Not Working

Background Knowledge Steam Input is an interface for developers to leverage controller configuration in Steam in their games. Depending on the game and how Steam Input compatibility is implemented, you might find that Steam Input isn't working. If you press F11 in a game and Steam Overlay doesn't appear and you have it configured to appear, Steam thinks that you are not in a game. Steam has controller button mapping for in-game, Big Picture Mode, and on desktop, and mappings for individual games. By default Steam will give certain controllers a desktop mapping that lets you move the mouse and bring up an on-screen keyboard, which is not what you want in a game. What Worked For Me My problem ultimately was caused by Steam putting the controller in desktop mode, because it thought I was not in a game, and those non-gamepad inputs being picked up by the game, while Steam Input was disabled because it didn't work. You can change the behaviour of a controller on desktop to sti

Import Large Amounts of Data to MySQL Quickly

Importing large amounts of data with SQL `INSERT` statements can take a long time. It's much faster to use MySQL's `LOAD DATA` statement. https://dev.mysql.com/doc/refman/5.7/en/load-data.html The data you upload must be in some CSV format; you can choose delimiters and escape characters. `LOAD DATA INFILE [filename] ...` will look for the file on the server where MySQL is running. Your MySQL user will need file permissions. MySQL is only allowed to read files on the server if they are in a certain directory. `LOAD DATA LOCAL INFILE [filename] ...` will look for the file on the machine that has connected to the MySQL instance. There is no restriction on where the file must be stored so long as your OS user has permission to read it. `LOAD DATA LOCAL` will only execute if you connected to MySQL with the `--secure-file-priv` option. i.e. `mysql -h [hostname] -u user -p db --secure-file-priv` DBMSes other than MySQL hopefully have a similar feature.

In HTML, an Input with Zero Length is Never too Small

Imagine you have an a text input with a minimum length: <input type="text" minLength="1"> Imagine you have a reference to this element and you call `.report Validity` or `.checkValidity`. So long as the input is empty, it will be treated as a valid length. You need to add t he ` required ` attri bute when you want the length to not be zero.

Gaming on Linux Gotchas

I've been PC gaming solely on Linux since the beginning of 2020 and generally things that are meant to work just work; it's just a case of installing a game through Lutris or switching on Proton for all games in Steam. But I've definitely experienced problems that have been some effort to resolve. I'll update this article over time as I find more things. Sometimes the Default Version of Proton Used is Out of Date At any time you will likely have many different versions of proton installed, so that if you have an issue, you can just toggle the version in the game's settings. For some reason when its set to "default" that doesn't always mean the latest version. I'm not sure if this is a bug or something Valve has done to certain games. In my case this was with Doom Eternal. GSync can Default to the Wrong Screen In your NVidia settings, there is a tab called "X Server XVideo Settings", which chooses which of your screens to apply GSync to. I

Fix Inability to Move Files to Trash in VSC

You need to configure an environment variable to tell Electron (what VSC is built on) how to trash things. In ~/.profile add: export ELECTRON_TRASH=trash-put You'll need to install trash-put separately. "gio trash" might be a pre-installed alternative. I thought that's what I was using but apparently not.

VSC Vanishing Go Imports

With the Go extension installed in VSC, by default if you have an unused import, when you save, it will disappear. If you're like me and you may habitually press ctrl+s, this is very frustrating. After a lot of messing around in VSC's settings. I learned that this "feature" has nothing to do with the settings pertaining to linting or formatting. It's actually to do with automatic import organisation, which you can configure as follows in VSC's settings.json. "[go]" : { "editor.codeActionsOnSave" : { "source.organizeImports" : false, }, } This solution comes from this StackOverflow answer. You can still organise imports with the shortcut shift+alt+o.

Fixing Gnome's Gnonsense

Although I spent a long time not liking Gnome, I've come round to it, and think it's the only desktop environment (on any OS) I can confidently recommend (I have not tried them all) (I used to be able to recommend Unity). Specifically, I recommend Gnome with Ubuntu's defaults and some additional extensions to improve the experience. Extensions Hide Top Bar — Makes the top bar only visible in the window spread / app list view. This makes the desktop cleaner and it's nice having the top of a window at the top of a screen. I prefer this to moving the top bar to the bottom because the top bar can only appear on one screen and I want my screens to look the same. No Topleft Hot Corner — It's too easy to trigger this by accident. Better OSD & Transparent OSD — I use these to improve the appearance of the volume indicator. By default it's too big, too central, and too opaque. These extensions change all of that. Volume Mixer —This lets you independ