Started watching Severance last night. This is a good one. Trying not to binge it…
Started watching Severance last night. This is a good one. Trying not to binge it…
Twitter replaces its free API with a paid tier in quest to make more money
Why the hell are website powered by micro.blog so crazy slow?
If you load the photos page on a random website created with micro.blog, the photos are loaded in full size! No thumbnails, but original size photos. That’s just crazy.
This website loads on first load 50 MB… That cannot be how it’s designed.
I wanted to remove the comments menu item from the WordPress admin sidebar menu. Some DuckDuckGoing later, I found this and it works great.
Paste this in your functions.php and it removes the comments, users and tools menu item in the WordPress admin sidebar.
function remove_menus() {
remove_menu_page( 'edit-comments.php' );
remove_menu_page( 'users.php' );
remove_menu_page( 'tools.php' );
}
add_action( 'admin_menu', 'remove_menus' );
I wanted WordPress to generate random post slugs when I don’t enter a post title. I asked https://mastodon.social/@janboddez how he did it, and he has written a blog post about it in 2019.
I’ve changed the code a bit for my need. If you want it, just paste this in your functions.php
add_filter( 'wp_insert_post_data', function( $data, $postarr ) {
if ( ! empty( $postarr['ID'] ) ) {
// Not a new post.
return $data;
}
if ( ! empty( $postarr['meta_input']['mf2_post-of'][0] ) ) {
$data['post_type'] = 'post';
}
if ( in_array( $data['post_type'], array( 'post' ), true ) ) {
global $wpdb;
do {
$slug = bin2hex( openssl_random_pseudo_bytes( 3 ) );
$result = $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM $wpdb->posts WHERE post_name = %s LIMIT 1", $slug ) );
} while ( $result );
$data['post_name'] = $slug;
}
return $data;
}, 10, 2 );
Material possessions are more often a burden than a pleasure. Give away or sell anything you own that does not make you happy. Do not let your possessions define you. We live in a world of plenty. That means you can own less, not more.
Early November I bought a Google Pixel 6a. I bought it with one reason: install GrapheneOS. I wanted more control over my privacy. Untill that day I’ve been using my iPhone 13 Mini.
Installing GrapheneOS is ridiculously simple. You visit their web installer and follow the steps. My first try gave an error, but that seemed due to a bad USB-C cable. After replacing the cable, I’ve clicked a few buttons and voila: GrapheneOS is installed.
So far, it has been great! It feels fast and snappy. I’ve installed some apps via the APK route and that works very well.
The apps I use:
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
Welcome to my new website! I don’t need a website, but here we are. I hate all have no social media, so I will be posting random things here.
For the nerds: running on WordPress, hosted on Linode.