Skip to main content

Senior Web Engineer. Open web / music. Remote DJ. Tall Dutch guy. #3million

micro.blog/sander

svandragt

mixcloud.com/cloudseer

 

Cuttlefish v0.4 Released

Cuttlefish is a PHP based hackable blog framework -- with the goals of being fast, easily hackable, and easy to adopt. I've been working on it since 2012, when it was known as Carbon. It can generate a static HTML site for uploading anywhere, or run dynamically.

Version 0.4 licenses the code as MIT, so anyone can build on top of the project. Cuttlefish now has API documentation courtesy of PHPDox, which is updated whenever code is changed. I've changed the code style from 'WordPress-like' to the PHP community default of PSR12. The project now comes with a Docker container which means getting up and running is even easier.

Install Cuttlefish is easy using the instructions. For a fuller list of changes see https://github.com/svandragt/cuttlefish/releases/tag/v0.4.

Known issue:  I still have trouble getting Xdebug to work, if you're familiar with Docker Compose and Xdebug I could use your help.

For v0.5, now that the codebase is in a better state, I'm looking at adding more features again.

 

 

Everyone has JavaScript, right?

This is helpful every two months or so.

 

My Let's Encrypt Setup

Scheduled Task (renewal)

$ sudo crontab -e

# Lets encrypt twice daily
0 7,19 * * * certbot -q renew

 

Script that reads le.txt and requests certificates for each domain

$ nano le.sh && chmod +x le.sh

DOMAINS=$(paste -s -d, le.txt)
sudo letsencrypt certonly --webroot -w /var/www/html -d $DOMAINS
sudo service nginx reload

Note: Recently certbot changed from seperating each domain with -d to comma seperated.

List of Domains (one per line, add to the end)

$ nano le.txt

vandragt.com
www.vandragt.com

 

 

What is the meaning of a site's Last Updated property?

When running a WordPress multisite, in the site directory each site has a Last Updated property. I previously incorrectly assumed this reflected  when the site's metadata changed, for example the site's attributes. However, archiving and deactivating a site does not change the Last Updated value, so what does it do in WordPress 5.2.1?

As usual the best place to look is the WordPress codebase. It turns out that, on a multisite, this value is updated whenever a post is updated or deleted. It reflects the last content update, not the site's metadata.

By inspecting the html and looking up the property name, we find that the function that updates this is called wpmu_update_blogs_date and there is an action hook wpmu_blog_updated that receives the site_id variable. This function can be called whenever we want to update the value. It isn't used anywhere else.

If we're looking to update this date whenever the site's status changes, then via the same process it appears that he actions to hook into site attribute updates are in wp_maybe_transition_site_statuses_on_update so one could write a quick mu-plugin that updates the Last Updated property whenever these fire.

 

I've just signed up for Zapier and Mailchimp to create a weekly email of an RSS feed containing any interesting articles I find. Hopefully that will both improve my Friday and stop the urge to share every interesting link.

 

Procedural Art with Unity3D

Shahriyar Shahrabi:

In the past few days, I have been experimenting with creating patterns using the particle system in Unity Engine. Here are some of the examples of the shapes I came up with.

Amazing shapes and wallpapers.

 

Updating Known

I wrote a quick and dirty upgrade.sh script that sits in the parent directory of my Known site (updated now with the new composer setup). I'm using the following directory structure:

config.ini  
Uploads/
html/
upgrade.sh 

The offical Known git repository is checked out in html/. The config.ini and Uploads folder have been moved to the folder to sit alongside it.

The contents of the upgrade.sh script can be viewed as a gist on Github:

It's not elegant but it makes updating to the latest Known changes pretty seamless.

 

Hide Trackbacks 1.1.3

Hide Trackbacks is a WordPress plugin that hides pingbacks and trackbacks from your website comments.

I’ve updated the plugin to indicate it works correctly with WordPress 4.9.9 and earlier. It's now also up to PHP 7.2 compatible, and has a number of small fixes to improve code legibility and alignment with the WordPress Coding Standards.

 

Kwallet should really link to Kleopatra to clarify you need to create or link a GPG key to your keychain.

 

Great post <a href="https://drewdevault.com/2018/07/09/Simple-correct-fast.html">https://drewdevault.com/2018/07/09/Simple-correct-fast.html</a><p>#status </p>

 

Open your mind

Interesting article about developing your passion and keeping and open mindset.

The belief that interests arrive fully formed and must simply be “found” can lead people to limit their pursuit of new fields and give up when they encounter challenges, according to a new Stanford study.

Read the article

 

 

Link: explain cron job syntax, love it <a href="https://crontab.guru/">crontab.guru</a><p>#status </p>

 

Hide Trackbacks 1.1.1

Hide Trackbacks is a WordPress plugin that hides pingbacks and trackbacks from your website comments.

I've updated the plugin to indicate it works correctly with WordPress 4.9 and earlier.

 

We're building a dystopia just to make people click on ads

We're building an artificial intelligence-powered dystopia, one click at a time, says techno-sociologist Zeynep Tufekci. In an eye-opening talk, she details how the same algorithms companies like Facebook, Google and Amazon use to get you to click on ads are also used to organize your access to political and social information. And the machines aren't even the real threat. What we need to understand is how the powerful might use AI to control us -- and what we can do in response.

This is why I run PrivacyBadger to block tracking, not ads.

 

The Death Of Stalin

Can't wait to see this film!

 

Vladimir Trump

Watching Trump’s presser, I had a feeling I’d seen it all before?—?while covering Vladimir Putin’s annual news conferences.

Source: A message to my doomed colleagues in the American media – Medium

 

Microsoft continous war on privacy

New controls are arguably an improvement, but data collection remains mandatory for most.

Source: Windows 10 Creators Update to rejig privacy settings in a move unlikely to please anyone | Ars Technica UK

 

You too can improve Firefox

Google Chrome is too dominating, this is not good for the web. So I'm switching back to Firefox, but it can be pretty ugly by default in places.

I like to apply the following tweaks to make it pretty again:

Screenshot-06_01_2017-10_48_22.png

Increase the Address Bar font size

Edit userChrome.css to make style changes to the Firefox UI. My Profile is located at %appdata%\Mozilla\Firefox\Profiles\<Gibberish>, use the previous link to find the location on your system. Inside your profile create a chrome folder and inside that create a userChrome.css. Add the following line:

 { font-size: 13px; }

The possibilities are endless but this does the trick for me. Restart Firefox after saving the file.

Remove unwanted buttons and the searchbox

Right click on any of the toolbar buttons > Customize... to bring up the Customize Firefox screen. Remove unused buttons and the search box (search via the address bar instead) by dragging them to the Additional Tools and Features panel --  or the hamburger menu panel to access them with a click.

Make the tabs square again

Firefox tabs have this rounded look to them, which I find displeasing: install the Squared Australis Tabs addon to add square corners instead.

Hide the menu bar

Did you know you can access the menu bar by pressing the Alt key on your keyboard? The menu bar is visible by default but it is not frequently accessed, so press Alt+V or bring up the View menu bar menu and untick the Menu Bar and optionally the Bookmark Toolbar items.

Hide bookmark toolbar item names

You can blank out the Name of a bookmark to have it display just the icon in the toolbar, which tidies up those frequently accessed sites.