It's kind of a blog if you don't think about it too hard
July 15, 2021
I recently hacked together a GNOME shell extension to allow selecting an alternate operating system when rebooting, so I don't have to wait around for the system boot menu to appear. And because I wanted to learn how GNOME shell extensions work.
~/.local/share/gnome-shell/extensions/
Alt+F2
, then typing r
.January 14, 2021
I recently noticed that when browsing a network folder full of photos in Linux using Nautilus or Nemo, the thumbnails are generated much, much slower than they are when browsing the folder from Windows Explorer. I don't know what Windows' secret sauce is for this problem, but I realized that by extracting the thumbnails embedded in the EXIF data of many JPEG files, thumbnail generation performance can be greatly improved since the entire file no longer needs to be transferred over the network in order to generate its thumbnail. And so, jpeg-exif-thumbnailer
was born.
The mogrify
and exiftool
programs must be installed. On Ubuntu and Debian, these may be found in the imagemagick
and libimage-exiftool-perl
packages.
This thumbnailer has been tested on Ubuntu 20.04, in the Nautilus and Nemo file managers.
Download the archive and extract it. Run ./install
, or see the README for instructions on manual installation.
If the embedded thumbnails are not large enough, Nemo falls back to reading the entire file to generate a thumbnail. Unfortunately, fast EXIF thumbnails will probably not work properly when Nemo is using a high zoom level.
November 11, 2020
Two years ago, I wrote about how to make Compiz more Fitts's law-friendly.
22 days ago, I wrote about how to make GNOME applications more Fitts's law-friendly.
Now it's Firefox's turn (running on Pop!_OS 20.04) To fix its close button, I had to add the following to userChrome.css. Choose only the snippet you need:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ONLY ONE OF THESE SNIPPETS SHOULD BE USED AT A TIME */
/* Firefox 88 and below */
.titlebar-buttonbox-container {
margin-top: -5px;
margin-right: -4px;
}
/* Firefox 89 and above - Normal density */
.titlebar-buttonbox {
margin-top: -17px;
margin-right: -4px;
}
/* Firefox 89 and above - Compact density */
.titlebar-buttonbox {
margin-top: -9px;
margin-right: -4px;
}
2021-07-13: Updated to be compatible with Firefox 89.
October 20, 2020
Two years ago, I wrote about how to make Compiz more Fitts's law-friendly. Apparently not many people think this is important, because it turns out it's also an issue with certain GNOME applications that use a GtkHeaderBar
.
My workaround is to override the theme CSS to shift the maximized window buttons slightly up and to the right, allowing them to (usually) be triggered by clicking the top-right pixel of the screen. For some reason, it doesn't work 100% of the time, but it's better than nothing.
Add the following to ~/.config/gtk-3.0/gtk.css
:
headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin-top: 0px;
margin-bottom: 0px;
}
.maximized button.titlebutton {
margin-right: -2px;
margin-top: -15px;
}
.maximized headerbar {
min-height: 24px;
margin: 0px;
padding: 0px;
}
May 27, 2020
Number of seating charts* created in April 2019: 10443
Number of seating charts created in April 2020: 557.
Only 5% of last year's volume.
*Every saved revision of a chart is counted separately, so these numbers are somewhat inflated.
September 26, 2018
On Xubuntu 18.04 Bionic, I found that, after activating Compiz, I was no longer able to throw my mouse to the top-right corner of the screen to close a maximized window. When clicking the top right pixel of the screen, nothing happened. (In fact, there seemed to be a "hole" in the window; right-clicking brought up the desktop context menu.) Not very friendly, according to Fitts's law. I found many posts from several years ago documenting the problem and workarounds, but none of them worked for me. (After all, who's still using Compiz in 2018?) But here's what finally worked for me:
~/.emerald/theme/theme.ini
in a text editor, and locate the [buttons]
section.horizontal_offset
and vertical_offset
to negative values. The appropriate values depend on the theme. For the Rezlooks-Graphite theme, I found that it would work with horizontal_offset=-3
and vertical_offset=0
.Note that you must re-apply your changes to theme.ini
if you open Emerald Theme Manager again.
May 15, 2015
tl;dr: Install the hotkey drivers.
I noticed soon after installing Windows 7 on my new laptop (Eurocom Shark 4) that I was sometimes getting no sound from my headphones. The Realtek control panel faithfully reported that the jack was connected, and muted the speakers as expected, yet no sound could be heard through the headphones. I experienced this problem on both Windows and Linux (Ubuntu 14.04), so I assumed it was a hardware or firmware problem.
However, after a bunch of futile Googling and tinkering, I noticed a pattern - it always worked on a clean boot, but not after resuming from sleep mode. This led me to refine my search terms, bringing me to this discussion. It turns out that the headphone jack needs to be reinitialized after system resume, and (for some reason I cannot fathom) the hotkey drivers are responsible for doing this! I had not installed the hotkey drivers because Windows responded to most hotkeys out of the box. But sure enough, after installing the manufacturer's hotkey driver, the headphone problem was resolved.
This might work for other Clevo laptops too. So if Google has sent you to this page, I hope it helps.
May 8, 2015
These are my notes on installing Windows 7 on the Eurocom Shark 4 (Clevo N150SD).
Windows 7 installation (from USB)
Setup will prompt you to load a USB driver.
Post install
Drivers
These lists are organized to match the driver DVD. When possible, I prefer to install from Device Manager to avoid the extra junk that the installers sometimes bundle.
May 3, 2015
This post is for me to look back on later and remember how to fix this!
I installed Ubuntu MATE 14.04 in VirtualBox, installed the guest additions, then switched on Compiz. It worked fine, until I changed the guest screen resolution. Then the guest screen looked like this:
After some trial and error, the fix: in CompizConfig Settings Manager, OpenGL plugin, uncheck "Framebuffer object".
August 6, 2014
I can't figure this out, and I don't think I'm a robot.
April 10, 2014
It has recently come to my attention that the server that runs this website was vulnerable to attacks exploiting the recently-discovered Heartbleed bug. If anyone managed to abscond with any of my passwords, keys, or other sensitive information, please return these items to brad@bgreco.net at your earliest convenience. Thank you.
January 29, 2014
Someone made a video and blog post of a little tweak I wrote for Google Maps on Android. Neat.
August 2, 2013
They are awesome. A coworker ordered a whole bunch of them for $2 each so now I have one. Let the fun begin.
Update 8/4/2013: It died already. I guess that's explains the price...
May 28, 2013
Yep.
April 10, 2013
Just a short list of the words I can think of for now. It may grow...
Deplane - It amuses me, for some reason, that we have a dedicated word for the act of getting off of an aircraft.
Rubbish bin - Far superior to "garbage can". Must be pronounced with a British accent.
Valchives - Definition: those little stringy things you find inside oranges and other citrus fruit. Trust me.
...along with most of the words used in Bulbous Bouffant
January 1, 2013
When I added a simple comment system to this blog, I intentionally did not include a CAPTCHA mechanism. I assumed (well, hoped) that this blog is both obscure and custom enough that it would be largely ignored by comment-spammers.
So, now there is an extra are-you-human check when you go to submit a comment. It's not the traditional "try to decode these symbols that vaguely look like letters if you squint really hard" CAPTCHA, since nobody likes those. Hopefully it will be sufficient to deter the bots, at least.
December 8, 2012
You might recall, gentle reader, that I once predicted that there would never be any comments on this blog. The reasons I gave were twofold: nobody actually reads this blog, and there is no mechanism in place by which my hypothetical loyal readers could leave comments.
But now, my second reason has been nullified! For I have coded a comment system! Nothing fancy going on with it; just a spot for your name and your comment. If you enter an email, it will be used to load a Gravatar image, and will not be stored. So you're safe from spam even if I get hacked. ;)
To test the comment system, I have asked an acquaintance of mine to give this blog his endorsement. Unsurprisingly, he was more than willing to oblige.
December 2, 2012
As you may or may not know, my initials are BAG. My parents insist that this was not intentional, but I know better. As I was contemplating initials that are also English words, I realized that, if I replaced my middle initial with any other vowel, its status as an English word would remain unchanged: BAG, BEG, BIG, BOG, BUG.
Well, that's cool, I said to myself. But just how lucky am I? That is, out of the 21² = 441 distinct consonant pairs, how many will form a valid English word when each of the five vowels is placed between them? We will consider the letter Y to always be a consonant.
To answer my question, I wrote a small PowerShell program to check each possible Consonant-Vowel-Consonant word using the Microsoft Word 2007 spellchecker:
$word = New-Object -COM Word.Application
-
$c = ('bcdfghjklmnpqrstvwxyz' -split '')[1..21]
$v = ('aeiou' -split '')[1..5]
foreach($l1 in $c) {
:set foreach($l3 in $c) {
foreach($l2 in $v) {
if(!$word.CheckSpelling("$l1$l2$l3")) {
continue set
}
}
"$l1 $l3"
}
}
And the results:
b g (bag, beg, big, bog, bug)
d g (dag, deg, dig, dog, dug)
h t (hat, het, hit, hot, hut)
m d (mad, med, mid, mod, mud)
p p (pap, pep, pip, pop, pup)
p t (pat, pet, pit, pot, put)
s p (sap, sep, sip, sop, sup)
Only 7 consonant pairs, or 1.6% of all consonant pairs, have the every-vowel-makes-a-word property according to Word. Even 7 is generous, as there are a few words that it claims are valid that I don't agree with.
October 15, 2012
A serious conversation overheard at work:
Person A: "I'm using the Force to update the name of this sysif."
Person B: "You can't just use the Force to do that!"
(Related.)
September 29, 2012
For some inexplicable reason¹, BioWare decided to not include support for the mouse wheel when scrolling through menus in Mass Effect 2. Here's an AutoHotkey script that will partially enable mouse wheel scrolling.
It works when scrolling through menu entries (Journal, Codex, etc). It does not work scrolling text boxes, such as the details that appear when you select a Codex entry. A pity, but it's better than nothing.
#IfWinActive, Mass Effect 2 SetKeyDelay, 0, 50 WheelDown::Send {Down} WheelUp::Send {Up}
(Related: whee!)
¹Read: Lazy PC port
September 18, 2012
Google's search bar is quite versatile. Besides returning (usually) relevant content from all over the Internet, it can act as a calculator, give you your public IP address, and perform unit conversions. For example, how many megabytes are in a terabyte?
...Wait, what?
I suppose there's not really a standard unit for measuring data per volume. Myself, I prefer to measure it in Libraries of Congress per bushel.
(Google does get it right if you capitalize the units.)
(I'd also like to point out that Windows Powershell has none of these problems.)
August 10, 2012
GOOD QUESTION! Let's find out.
Why? I'm not too sure myself. I'm not foreseeing myself stunning the internet with my brilliant, insightful comments on current events or offering sage yet witty advice that will leave the masses hanging on to my every word. In fact, your guess as to what (if anything) will end up here is as good as mine!
Prediction: After the initial flurry trickle of posts, there will be approximately one post every four months.
Prediction: Each post will get precisely zero comments, for two reasons: (a) not many people will stumble across this little corner of the web (and if you're one of them, I would advise escaping as quickly as possible while you still can), but mostly because (b) I haven't coded a comment system.
(also FIRST POST)