The One with the Thoughts of Frans

Disable Firefox Fullscreen Animation

Go to about:config, as ever. Then disable browser.fullscreen.animate.

CommentsTags:

Remove dns-prefetch from WordPress 4.9

Most people seem to have switched to statically generated blogs like Hugo by now, but I’ve been using WordPress for some 13 years and combined with WP-Super-Cache it’s been static for pretty much that entire time. There’s little point to putting in extra time and effort just for some extra nerd cred.

On the downside, every new 4.0+ release seems to add more cruft to the header. My functions.php consists of an ever-growing list of remove_action incantations. Here’s the latest addition, necessitated by WordPress 4.9.

// remove WP 4.9+ dns-prefetch nonsense
remove_action( 'wp_head', 'wp_resource_hints', 2 );

For those interested, here’s my full messy collection, including a few hints I commented out.

add_post_type_support( 'page', 'excerpt' );// See http://wordpress.mfields.org/2010/excerpts-for-pages-in-wordpress-3-0/
remove_action('wp_head', 'rsd_link');// Windows Live Writer? Ew!
remove_action('wp_head', 'wlwmanifest_link');// Windows Live Writer? Ew!
remove_action('wp_head', 'wp_generator');// No need to know my WP version quite that easily

// remove WP 4.2+ emoji nonsense
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );

// remove WP 4.9+ dns-prefetch nonsense
remove_action( 'wp_head', 'wp_resource_hints', 2 );

// disable embeds nonsense; not even sure what it does
// Remove the REST API endpoint.
remove_action('rest_api_init', 'wp_oembed_register_route');
// Turn off oEmbed auto discovery.
// Don't filter oEmbed results.
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
// Remove oEmbed discovery links.
remove_action('wp_head', 'wp_oembed_add_discovery_links');
// Remove oEmbed-specific JavaScript from the front-end and back-end.
remove_action('wp_head', 'wp_oembed_add_host_js');

// Jetpack
//remove_action('wp_head', 'shortlink_wp_head'); // Don't need wp.me shortlinks
// No jQuery! (als Jetpack
//if( !is_admin()){
	//wp_deregister_script('jquery');
	//wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"), false, '1.3.2');
	//wp_enqueue_script('jquery');
//}

// remove OneAll Social script from regular page
remove_action ('wp_head', 'oa_social_login_add_javascripts');

Comments

Why Windows Is Better Than PulseAudio

Wait, what? You heard me. On Windows you can set sample rates per sound card. It looks like this.

Setting one soundcard to 24 bit, 96 kHz in Windows. Windows refers to this as “Studio Quality.”

In PulseAudio you’re limited to a primary and secondary sample rate. I’ve actually been using pasuspender more, also because its AC3 passthrough never seemed to work.

CommentsTags: ,

Is My Firefox Out of Date?

When I logged in, WordPress tried to inform me that the particular browser I was using was out of date.

WordPress’ “Your browser is out of date” greeting.

So, is it?

Well, we can take a look at the Firefox ESR download page to find out.

The current version of Firefox ESR is 52.4.1, releasenotes here.

Nope. Still Firefox 52, which will remain supported until Firefox 60.

The Firefox support window. Source: https://www.mozilla.org/en-US/firefox/organizations/faq/

Always fun, these automated checks. 🙂

Comments

Fix Minuscule Zoom Limit in Evince

I have plenty of RAM and a UHD monitor, but Evince sees it fit to limit zoom to under 200% in many a newspaper-sized document.


# get current cache size (defaults to 50?)
$ gsettings get org.gnome.Evince page-cache-size
uint32 50
# set it to something more reasonable like 500
$ gsettings set org.gnome.Evince page-cache-size 500

In smaller documents this makes pretty much the entire document exist in RAM, which eliminates loading nonsense while going back and forth in a document. Overall, a much smoother experience.

I understand the reason for the hard-coded default limit, but I have to wonder if there isn’t a more dynamic way of handling this. Say, either 50 MB or 2% of total memory.

Comments (1)

Adding “Search in Folder” to Thunar Custom Actions

Thunar is one of the best graphical file managers I’ve used, and I say that even while I own a Directory Opus license for Windows. I have some minor quibbles like very sparsely populated default actions on files and folders, but the biggest flaw is doubtless that the breadcrumb navigation doesn’t feature all of the regular folder interactions. In any case, in this blog post I intend to show how I improve on both Thunar and GNOME Search in one fell swoop.

I’ll start with a screenshot of the desired end result. You right click on a folder, and you’re presented with the option to search for files in it.

My context menu with Search for files.

In order to add this custom action, you’ll have to configure custom actions.

Edit → Configure custom actions.

Then you click + to add a new one, or you can edit an existing action.

Choose whether to add or edit a custom action.

You can type the name that will show up in the context menu, a little description for yourself, choose a fancy icon, and under appearance conditions you can choose whether this custom action applies to a specific type of files or folders. Unfortunately this dialog can’t be resized, but since you can copy and paste it’s not too bad.

gnome-search-tool --path=%f --contains=
The Edit Action dialog.

Finally, here is the result. Note that since I started gnome-search-tool with --contains=, the option to search for files containing specific text will show by default.

GNOME Search for Files (gnome-search-tool) with Contains the text expanded by default.

You can perform similar tricks with any of these other options.

$ gnome-search-tool --help
Usage:
  gnome-search-tool [OPTION...] - the GNOME Search Tool

Help Options:
  -h, --help                      Show help options
  --help-all                      Show all help options
  --help-gtk                      Show GTK+ Options
  --help-sm-client                Show session management options

Application Options:
  --version                       Show version of the application
  --named=STRING                  Set the text of "Name contains" search option
  --path=PATH                     Set the tet of "Look in folder" search option
  --sortby=VALUE                  Sort files by one of the following: name, folder, size, type, or date
  --descending                    Set sort order to descending, the default is ascending
  --start                         Automatically start a search
  --contains=STRING               Select and set the "Contains the text" search option
  --mtimeless=DAYS                Select and set the "Date modified less than" search option
  --mtimemore=DAYS                Select and set the "Date modified more than" search option
  --sizemore=KILOBYTES            Select and set the "Size at least" search option
  --sizeless=KILOBYTES            Select and set the "Size at most" search option
  --empty                         Select the "File is empty" search option
  --user=USER                     Select and set the "Owned by user" search option
  --group=GROUP                   Select and set the "Owned by group" search option
  --nouser                        Select the "Owner is unrecognized" search option
  --notnamed=STRING               Select and set the "Name does not contain" search option
  --regex=PATTERN                 Select and set the "Name matches regular expression" search option
  --hidden                        Select the "Show hidden and backup files" search option
  --follow                        Select the "Follow symbolic links" search option
  --mounts                        Select the "Exclude other filesystems" search option
  --display=DISPLAY               X display to use

Also see Finding Files on the Ubuntu wiki.

CommentsTags: ,

Lossless Cut with ffmpeg

As another addendum to my notes on image optimization, here is how to cut a piece of audio or video as losslessly as possible with just ffmpeg on the commandline.

In this example we want the piece of audio from 1:30 to 2:00.

fmpeg -ss "1:30" -i audio-full.m4a -c copy -t "2:00" audio-cut.m4a

CommentsTags:

The Ghost of Student Counseling

Dye-based printer ink, potentially with a little water, makes for a surprisingly good fountain pen ink. Never stick pigments in your fountain pen. Heck, perhaps you shouldn’t put printer ink in any fountain pen over €5 or so. Anyhow, here’s a little doodle drawn in printer ink, with some quick Inkscape post-processing.

An entity with scary eyes, spaghetti arms and a big red heart tries to embrace you.

CommentsTags:

Skype on Android x86

A new Skype update was installed! Now “rebuilt from the ground up […] the best Skype we’ve ever built” (release announcement). Okay, cool. Let’s give it a go.

What’s that, a crash? And it won’t be fixed because I have the wrong kind of CPU? You can tell Google Play not to update the app by unchecking auto-update. Tap the three vertical dots in the top-right corner to bring up the option.

Uncheck auto-update.

Then download the old Skype Android app from AndroidDrawer.com (“Because Newer is Not Always Better”) or any similar site. Version 7.46.0.596 seems to be the most recent version which still works on x86.

Enjoy your Skyping. Or maybe just switch to Discord. It offers video chat now. Skype and I have had a decent run since ’04, but let’s face it, these past few years nothing good has happened. Take, for instance, the announcement last year that Skype for Linux was being updated again.

For example, you’ll be using the latest, fast and responsive Skype UI, you can share files, photos and videos and send a whole new range of new emoticons.

I have no idea what they intended by talking about “responsive UI”. The supposedly retired version 4.3[1] scales along just fine with DPI thanks to it being Qt-based. I guess they hope that by just tossing out random terms I won’t notice the old version already does all the things they’re boasting about. Well, except for those emoticons. Big whoop.

What’s my ICQ number again?

[1] “Important notice: All Skype for Linux clients version 4.3 and older will be retired on July 1, 2017. To keep chatting, please install the latest version of Skype for Linux.”

Comments (1)Tags:

Changing the Android Default Alarm on Zenfone 2

I don’t like the default alarm sound on my phone much and apparently changing it to something a little bit gentler can only be done on a per-alarm basis. Luckily I found this:

Today I was looking for a way to change the sound that is applied by default to new alarms you create in the Alarms app. After quite a bit of effort I came upon the following procedure:

  1. Install ES File Explorer
  2. Open it and select / from the Favorites
  3. Browse to /system/media/audio/alarms
  4. Click on the file you want and in the "Open with" prompt select "ES Media Player"
  5. Click on the bell beside the file name, pick "Set alarm" and click OK

Should you choose to change again the default, you may notice that the defaults you pick will appear in the music library. Also, they will be listed twice in the tone selection list which appears when you manually change the tone of an individual alarm.

You can fix that with the following steps:

  1. Open Settings
  2. Go to Applications > Manage Applications > All
  3. Click on Media Storage and then Clear data
  4. Reboot your phone
  5. You will now have to set your new default sound

(I've noticed that sometimes, when you view a music album which doesn't have a cover art image and add an album.jpg file to it later, Music Player will not use that file for the cover art. The above steps, as a side effect, will make Music Player look for images for all albums, thus having the cover art of all your albums updated.)

Hope this helps 🙂

Comments

Older Entries »