#TIL On the Safari start page on iOS there’s an edit tab at the bottom where you can disable sections like suggestions.
Sander van Dragt's Notes
-
-
HTMXPress 0.1.1
HTMXPress 0.1.1 has been released, the HTMX plugin for WordPress! More info
Improvements to code readability and security, as well as updates to versioning and error handling. Notable changes involve the removal of deprecated syntax, enhancements to template loading logic, and an upgrade of the HTMX script to a newer version.
-
Repoman 0.3
Repoman is a script to export and import a list of git repositories. Version 0.3 has the following improvements:
The repoman script has been enhanced with new filtering options like --no-remote, --all, and --help for better control over repository listings. The command-line interface now features improved parameter handling and a detailed help menu with usage examples. Error handling has been upgraded by switching to exit statements for more reliable termination and enhancing input validation. Additionally, the script now robustly handles empty lines, invalid entries, and potential failures during git operations.
- Get the latest version from GitHub
-
#til Also on the subject of Firefox, there are some amazing #Firefox tab management add-ons out there:
- Winger -- excellent for those favouring a one window per project workflow.
- native Tab Groups!
- Favicon Switcher -- excellent for distinguishing multiple project on the same domain.
- Keep pinned tabs alive -- always have access to the pinned tabs. Great with Sticky pinned tabs and Toggle pin tab.
- Select after closing current -- excellent keyboard support on this one.
-
Remembered about this hidden
browser.compactmode.show
Firefoxabout:config
setting, enabled it inCustomize toolbar...
and added a few tweaks to myuserChrome.css
file. Considering the browser is open all day for me, it's worth optimising the environment a little for open tabs. #til #firefox/* make it easier to find active tab */ .tab-background { &:is([selected], [multiselected]) { border-top: 1px solid #444 !important; } } /* thinner pins, even in compact toolbar mode */ .tab-content { padding: 0 4px !important; } /* remove space between tabs */ .tabbrowser-tab { padding: 0 !important; }
-
Lamb 0.5.3
Lamb is Literally Another Micro Blog -- Barrier free super simple blogging, self-hosted.
The update includes several feature improvements and design/layout enhancements:
Features:
- Added support for meta descriptions to improve SEO and content representation
- Enhanced metadata semantics with elements like itemprop and for better accessibility
- Introduced a dynamic title rendering function to manage site and page titles
- Updated feed styles in the 2024 theme, including SVG background integration
- Replaced the author meta tag with a more flexible author_name field
Design & Layout:
- Refined the page title logic to use a global site title as a fallback
- Adjusted H1 element styles for visual consistency
- Refactored post rendering to improve layout and meta information display
- Removed opacity issues and modified borders for better accessibility
See the link below for a full changelog:
Originally written on lamb-releases:
Via lamb-releases -
Sitemaps can be in XML sitemap, RSS, or Atom formats. -- Best practices for XML sitemaps and RSS/Atom feeds
-
I needed some way to open a bunch of text links in browser tabs for a Sprint Refinement, so I generated a little python script for it. #projects
-
I should really add pagination to my #lamb blog. There's an issue already.
-
Needed a way to open a bunch of text links in browser tabs, so I generated a script. #projects
-
It seems sometimes I'm researching and want the previous tab to become active after closing a deep dive, and other times I'm reviewing the tabs and want the tab to the right of the active one to become active. Is there any way to codify this I keep changing my browser's settings. #technology
-
Cut a sharp end to a plastic straw. It makes for a good phone charging port cleaner! Actually, it worked better than a tooth pick for me. #technology
-
OK I figured out a very useful #Godot debugging trick: conditional breakpoints are not supported natively but can be added to your code.
- Set an if statement for the condition or expression you want to break on.
- As the code block for the condition being true add
pass
and set a breakpoint on this line. - After hitting it, all the debugging tools are available.
-
PHP can sometimes be unintutive:
-
Lamb 0.5.2
Lamb is Literally Another Micro Blog -- Barrier free super simple blogging, self-hosted.
This is a tidy up release, with minor functional changes:
- Menu items are no longer showing in timeline
- More secure sessions
- Deferring scripts for improved performance
- Lowercase tag pages for canonical SEO
- Add 'published' date to Atom feed entries for better aggregation
Originally written on lamb-releases. #lamb #projects
Via lamb-releases -
#til In #Godot when you attach a node with a scale as a child of one that doesn't support scale (
Node
vsNode2D
for example), there is a flicker as the card is rescaled. Convert the node to a scale supporting type to fix this. -
#til In Godot, if a scene is instantiated at design time and a child is added to it, does the child belongs to the scene whose tree is currently open, or the scene it's attached to?
When duplicating a node (including a scene) at runtime it is the node tree where the node sits that is duplicated, so it includes the child. But if the scene is marked as a
InstancePlaceholder
, andcreate_instance()
is called at runtime, it creates a instance of the scene, and any attached children have to be duplicated and attached to the instance with code. #Godot -
#til In Godot, when you have a project containing a node
MyNode
that is a scene itself, andMyNode
contains two child nodes within the scene and one is added as a child ofMyNode
in the project, the number ofget_children()
that a script belonging to the root node of theMyNode
scene returns is 3. #godot -
Additional housekeeping routine prior to upgrading Ubuntu server
I upgraded one of my personal Ubuntu servers yesterday and with the knowledge of a good daily backup I knew I didn't have to prepare and see what I would encounter. This particular server has upgraded twice before, so has some custom and legacy configuration. After the third try I was successful and I wanted to share the following tips that helped me smooth out the upgrade process.
Clean up apt sources
The upgrade process will disable all third-party sources from your system to avoid complications updating system software, so it is helpful to be able to list all disabled sources. To aid in this I found it helpful to clear out the apt sources files before the upgrade my self.
In particular, in preparation of the upgrade, I removed .distUpgrade and .save files created by previous upgrades. I then removed all commented lines from the remaining source files starting with
# deb
, then deleted any 0 byte files which have no content:find . -type f -size 0c -delete
.This made it obvious what files had changed and what those changes are, that I needed to review. Typically by running
find . -name "*.list" -exec sed -i 's/jammy/noble/g' {} \;
after the upgrade was complete.Update custom apt sources / PPAs before upgrading
It turns out I had Nginx and MariaDB installed pinned to a particular version that was no longer supported on the target Ubuntu Server version, this caused one upgrade to install the system versions which were incompatible with my configuration. On a second go, I first upgraded the software to the latest supported version for my legacy Ubuntu version, which updated the apt sources to something that was better supported.
Set DNS servers
Somewhere Ubuntu switched to systemd DNS management and I hadn't run
sudo nano /etc/systemd/resolved.conf
and set a DNS server, resulting in not being able to resolve any domains after the upgrade. I was able to set and verify theResolveD
configuration before the upgrade as the system service was already installed. After this, I encountered no issues. -
Lamb 0.5.1
It's been a while since 0.5.0. Changes:
- Mainly third party package updates
- Compatibility fixes for atom feed
Originally written on lamb-releases:
What's Changed
Create FUNDING.yml by @svandragt in #97 Bump symfony/yaml from 7.1.5 to 7.1.6 by @dependabot in #99 Bump squizlabs/php_codesniffer from 3.10.3 to 3.11.1 by @dependabot in #100
-
GitHub, if you read this, please let me change the default e-mail address associated with my employer GitHub organisation to my work address, so that by default I don't have to change it from my personal one, when merging PRs. Thanks.
-
Saw you can get GitHub to generate a CSV file of the sponsorable direct dependencies your projects use! and then tweak the CSV and do one off/monthly sponsorships, getting insight into the number of sponsors and organisational sponsors. Nice!
-
If you're using Ubuntu 22.04 or derived distributions like elementaryOS 7.1 and are trying to run a gcc13 compiled program, such as Anytype 0.45+, you might find you need to upgrade your system libraries before it runs: https://stackoverflow.com/a/16605759/997
-
If you use WordPress for a blog, what is the plugin you can’t live without?
-
#TIL Deleted files can be restored in JetBrains products' Local History feature, such as PHPStorm.
-
Notice: Function start_monday was called incorrectly.
-
Added Docker pruning to my system-update Linux administration script, to help free up disk space. #projects #systemupdate
-
Lamb 0.5.0
Originally written on lamb-releases:
New in this release:
Crossposting from feeds. Support for user themes. A new retro 2024 theme.
I've been able to move the project closer to my vision for a frictionless blog and rss aggregator. #projects #lamb
Via lamb-releases -
Taskfile EOL
I've archived Taskfile and am now using Just. It's got more community support and works better in my experience.
Taskfile will keep working going forward but I have no plans for new features. If you are a used, I'd like to thank you.
Update: I'm not completely happy with how the just commands are executed, many shell commands I can't get to work, so I'm considering moving back to Taskfile. Will keep you posted
-
I switched back to the vintage theme as the 2024 Lamb theme I'm working on has some display issues on mobile. #lamb
-
Setup TextPattern using PHP composer and DDEV
I was totally going to step-by-step this guide but then I lost my draft.
TextPattern (TXP) instructs you to extract a zip file into your webroot and on upgrade replace all the files. If you have used PHP Composer to install your PHP dependencies you know this can be done more smoothly.
Composer PHP dependencies
If you want to the quick way, I've created a
composer.json
to get you started: view gist.It adds the GitHub repository as a composer dependency, and installs it into the
site/
directory usingoomphinc/composer-installers-extender
. The repo's type is set as a project type, so there are a couple of lines needed to setup composer installer to match it.Run
composer update
, you will now have a site and vendor directory, in addition to the composer files:├── composer.json ├── composer.lock ├── site └── vendor
Missing JavaScript Depependencies
This typically should have been enough but in the TextPattern GitHub project the
package.json
file that contains the JavaScript dependencies is both ignored by git (so is missing from our checkout) but requires dependencies the install needs to run.Let's pull in the copy from the
main
branch and install the dependencies using npm:$ cd site $ wget https://raw.githubusercontent.com/textpattern/textpattern/main/package.json $ npm install --omit=dev $ cd ..
Local environment
For a local environment, I recommend DDEV. To set this up, simplify specify a project name and the docroot where the TXP install is installed to:
$ ddev config --docroot=site --project-name=mysite $ ddev start $ ddev launch
The #TextPattern Setup wizard should now open. Use
ddev describe
to inform you of the database values to enter in the setup wizard.edit: For some reason I'm getting a database unavailable message. I'll update this if I find a solution. edit2: Solved I think, either through a reboot or the npm instructions.
-
If you're looking for a script to get the top errors form a PHP error_log, then I published that: https://github.com/svandragt/top-php-errorlog #projects
-
There is no barrier when there is no UI friction. #lamb #projects
-
By the time you're logged into your CMS or web service you could have already posted something. #lamb #projects
-
We need more instant publishing on the web. All the UI holds back our ideas. #technology #lamb #projects
-
Macos' patch command is outdated and doesn't work with some modern patches. Homebrew has a gpatch (GNU's patch) which is up to date and the composer PHP utility takes advantage of this automatically if it's installed. #til
-
Wine32 on elementaryOS 7 or Ubuntu 22.04
x86 games, like Championship Manager 01/02, might not install on this OS which cannot install wine32 due to system conflicts. This means apps like Bottles (Wine wrapper) cannot select a working Wine version.
To get around this, install the PlayOnLinux flatpak, which has an option to change the current Wine version. This will let you pick x86 versions, which install wine32 inside the flatpak. After which the installer will run.
If you get prompted to insert the CD use this trick to copy the the files into a virtual CDROM
-
Taskfile 2.0.0
I've released Taskfile 2.0.0, a task runner using taskfiles containing bash functions.
It's a nicer menu and shorthand for sourcing a bash file with functions.
The latest version contains a few small changes. As I renamed system tasks, semver dictates a new major version is called for:
Breaking change: inbuilt tasks (_edit, _edit-local, _help) are now prefixed with underscores so they're hidden from the Task list.
- New: hide your own helper tasks by prefixing their function name with underscore
- New: edit your local taskfile by running t _edit-local
- General tidying up
To update simply git pull if you git installed it, or replace the Taskfile.sh script some other way.
-
While Palworld allows for online play, its huge concurrent player numbers were not the result of its developer carefully cultivating a fear of missing out (FOMO) among players.
A chill game that’s not causing mental health issues, genius.
-
I've archived my php-activate project as I encountered a breaking bug between the version of PHP used and
composer
commands. I'm not prioritising looking into this right now, and switched back to usingupdate-alternatives
. #projects #phpactivate -
Sometimes I want to monitor a page for changes, for example news articles where the publication has contacted someone for comment. This week I'm trying out Distill Web Monitor as a browser extension and optional desktop app and it has nice features such as a very extensive notification system (desktop, email, audio) and visuall diff, monitoring of specific parts of the page etc.
Just a tip if you're looking for something similar. #software
-
Small tip: In Firefox you can enable tab previews on hover by setting the following preference:
browser.tabs.hoverPreview.enabled
totrue
-
Found an interesting article with a positive take on useful features that modern blogs should have. The Hacker News comment thread shows that whether a feature is considered useful is very subjective.
I'd like to go further and state that most of the usability and user experience enhancements should be implemented as browser add-ons, so that they can be installed if the user sees it as a positive enhancement to their reading experience.
The old-school view is that the reading experience is the domain and the responsibility of the browser, and we have collectively gone way beyond what a website should offer in terms of behaviour. #technology
-
energy saving #linux style:
$ sudo crontab -l 0 1 * * * shutdown -P
-
-
Trying out a new 2024 theme I've started working on. It's not super clear yet where a new post begins, and it's a bit bland. #lamb #projects
-
Bandcamp celebrated their 40th birthday last month by removing its most useful feature, it's no longer a BandCamp Friday every month!
-
Most mobile “games” are like being a Sponsor on the Hunger Games: spend money dropping in some booster food for the contestant, who you have no control over. Is it time to reclassify these premium currency manager apps under the Finance category they belong to? Using their family's credit card, it's training multiple generation of kids to become hedge fund managers gambling their own future. My review of NASCAR Manager: 0% interest gained #games #iap
-
Schrödinger's login: if I am able to comment as a member, but see a login form when I click on my account, was I logged in or not?
-
Lamb 0.4.0
Originally written on lamb-releases:
What's Changed
Image upload support! by @svandragt in #34 PHP8.2 + devbox support by @svandragt in #46 Bump symfony/yaml from 6.4.3 to 7.0.3 by @dependabot in #48
-
Tried 1Password for SSH keys and Git management (keys in 1Password, authentication via agent + desktop prompt before access, and 1Password must be running) and not a fan of more red tape around the SSH keys. Non-interactive processes just fail to use the key first-time round, so I ended up having to commonly do operations twice. Easy restore from a BackInTime backup. #security #linux
-
Navigate Xbox Series console using LG remote
To navigate an XBOX series games console using an LG Magic Remote, first disable the Automatic Configuration option in the Connection settings under HDMI Configuration in the TV's settings. Reconnect the XBOX's HDMI cable going into the TV. Then on the input switcher, edit the Xbox setting, mark it as a Blu-ray player manufactured by Microsoft, and follow the wizard. #technology
-
Looking at my browser tabs, I can't believe that we collectively have still not standardized on page title vs site title formats in 2024. I've seen SITE - PAGE, PAGE / SITE, PAGE | SITE, SITE: PAGE, PAGE etc. I'd prefer it if we had a
sitetitle
tag inhead
and let the browser figure it out. #technology #html -
Content vs crap.
#technology
-
Use an expression to select an array value in PHP. It's handy for quick output logic. Update: it's a bit too clever, perhaps, versus using the tenary operator.
$classes .= [ ' sort-default', ' sort-custom' ][ has_custom_sort( $post ) ];
-
Why do web-browsers not have a dedicated "Back to top" button? #technology
-
I replaced my cold half finished coffee with a hot half finished coffee.... because the machine ran out of water 😂
-
Finally updated my #WordPress Blocks In Plain English page with the WordPress 6.3 change in naming from Reusable Blocks to Synced Patterns. #technology
-
Created a HTMX PHP sandbox to get started really easily. Feedback welcome. Might add some convenience functions https://github.com/svandragt/htmx-php-sandbox #projects
-
I've updated my one stop system update script to remove unused Flatpaks. #linux #projects
-
What would it take to make writing vanilla JavaScript more pleasant? After reviewing the code for my blogging engine Lamb I concluded:
Most of the code adding interactivity to personal websites comes down to running code after the page has loaded; niceties to query the DOM and hook into events. There's probably more but this is a start. The result is shorthand.js. Hint: it's not dissimilar to jQuery, but you can fully learn it in 5 minutes.
Which simplifies code to:
onLoaded(() => { const forms = $$('form.form-delete') forms?.forEach($form => $form.on('submit', ev => { cancel(ev) let confirmed = confirm(`Really delete status ${ev.target.dataset.id}?`) if (!confirmed) return ev.target.submit() })) })
This is just a prototype and will evolve.
-
If you're using the Anytype (current version at the time of writing: 0.37.3) AppImage and made a .desktop file to launch it, here are a few tweaks that integrate it into your system better.
You may want to use a program like Desktopius to edit the .desktop file.
Prevent two dock icons
If you see one item for the AppImage and one for the application window in the Dock, add
StartupWMClass=anytype
and these will be combined. This value is the result of runningxprop WM_CLASS
and clicking on the Anytype main window.Fix the icon
If you see the generic icon, extract the icon to a path and update
Icon=/path/to/anytype.png
(replacing the path to the directory where you will extract the icon).To extract the icon from the AppImage do the following:
$ cd /tmp $ mkdir anytype && cd anytype $ /path/to/Anytype.AppImage --appimage-extract .... $ cp squashfs-root/usr/share/icons/hicolor/1024x1024/apps/anytype.png /path/to/anytype.png
-
PHP-Activate 0.3.1
I've released php-activate 0.3.1, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will switch to the correct PHP version for the local shell session. It does not require sudo, so even works in IDEs.
The latest version contains a few small changes:
- Eliminate the activate_php:export:20: invalid option(s) output. Exporting the php function is not needed as we source the script into the current shell session.
- Harden the script by implementing shellscript linting recommendations.
- Readme update.
-
PHP-Activate 0.3.0
I've released php-activate 0.3.0, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will switch to the correct PHP version for the local shell session. It does not require sudo, so even works in IDEs.
The latest version drops support for the Fish shell again, and fixes compatibility with direnv. The correct PHP version is activated when changing into a project directory that is setup according to the README. #projects #phpactivate
-
I experimented with _hyperscript to replace the little JS enhancements on the Lamb microblog over the weekend. After a day I had all the scripts replaced with clearer code in about half the lines of the previous JavaScript. It sounds like a success, however I rolled it all back. This is because _hyperscript requires a 100KB library, whereas the 3KB JavaScript it replaces does not. As Lamb is a minimal blogging system, that's the vast majority of the pagesize. #technology
-
Lamb image test
Image upload support has landed in the Lamb repo:
Drag images into the composer textarea and they will be automatically uploaded behind the scenes and inserted into the post as markdown, similar to how GitHub works:
This has been the main missing piece for me, so I'm very pleased. #lamb #projects
-
Ashley Belanger writes for Ars Technica Apple gets 36% cut of Safari deal with Google as default search:
Statista reported that Google's advertising revenue was $224 billion in 2022, and based on that, Engadget estimated that Apple likely gets paid in the tens of billions of dollars for Google's default Safari placements.
Meanwhile Slack, Discord and others continue not to benefit from an Electron commit that wasn't properly reviewed setting Search with Google as the default #technology #privacy
-
There is no queue, I play one song: Spotify adds the next song in the playlist in the queue. There is one item in the queue, I add another song to the queue: Spotify replaces the queue with the song.
-
I like to have pinned browser tabs on any window (mail, calendar etc) that do not disappear. These two together help with that:
-
PHP-Activate 0.2.0
I've released php-activate 0.2.0, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will switch to the correct PHP version for the local shell session. It does not require sudo, so even works in IDEs.
The latest version adds support for the Fish shell. #projects #phpactivate
-
When you want to create an exception to a
add_header
directive in nginx that is declared in an include, just declare it before it, as successive declarations of the same header are ignored. #til -
On personal goals
Today, I've realised my overarching goal as a software engineer: create digital experiences that help improve mental health for the people using them.
Unwittingly I myself have trended towards community software where capitalism, media manipulation and corporate influence is minimised (open-source, privacy first, self-hosting), and writing software with these values in mind.
In my experience, capitalism and corporate software distort the incentives of software for the financial benefit of it's backers. Media manipulation uses information overload and content agendas to influence the news cycle and change the common values we live by. This ultimately is more important to them than the wellbeing of the person experiencing the artifact, but not to me.
How have I been unwittingly trying to create positive user experiences:
- Having ownership over your content through blogging software that does not demand your attention.
- Creating a safe space for content consumption of trusted resources.
- Reducing friction in everyday tasks also benefits mental health and reduces frustration.
- Having peace of mind working on technologies that avoid complexity,
- Building foundational projects to help understand how to think about replacement products that contain these values.
- Helping people make time for oneself.
-
Made a Linux shell script called BreakAware that calculates the time since your last break as I couldn't find an alternative to Pandan (macOs).
BreakAware is a lightweight and user-friendly Fish shell script designed to help you maintain a healthy work-life balance. It tracks the time since your last break, whether it's due to PC sleep, hibernation, logout, or session locking. BreakAware empowers you to be more aware of how you spend your time and encourages you to take regular breaks, enhancing your productivity and well-being.
-
If you want an example of why we need a viable open source phone ecosystem, try and share some assorted music files from your non-Apple pc to another person’s iPhone. #technology
-
Updated my Notetaker tool rundown, with a new current pick. https://brain.vandragt.com/books/workflows/page/notetaking-tools
-
RAM Usage Nerdery
I've been wondering how much RAM I used on my 32GB Ubuntu derivative workstation, mainly used for web development using docker containers and light vm experimentation. Yes when I spotcheck with
htop
I have enough RAM free, but do I actually need 32GB, when I'm in the market for a new device or an upgrade?It turns out, yes I do ideally.
The setup
On startup I've been running this script to save the memory stats into a csv file:
#!/usr/bin/env bash while true do free | grep Mem | tr --squeeze-repeats ' ' ',' | tee --append ~/memory.csv sleep 10 done
Today (after 15 days) I pulled the stats into a database and browsed it:
sqlite-utils insert /tmp/mem.db memory-stats memory.csv --csv datasette /tmp/mem.db
Sorting by the available column shows that the lowest value I get is 11.9GB available to be freed.
The available column is the sum of the Free column plus the portions of the Buffers and Cache columns (or the Buff/cache column) that can be relinquished immediately. The Available column is an estimate, not an exact figure. https://www.howtogeek.com/456943/how-to-use-the-free-command-on-linux/#the-available-column
I think it's a reasonable measure. This system does not have zram memory compression enabled, that would help probably.
It has 4GB swap, I did not measure it's usage.
Hopefully this review helps for people who want to measure their own usage.
#linux
-
You can search GitHub wikis by using the search bar and then filtering by wiki. That's almost as nice as keeping your notes in a Lamb instance ;-) #TIL
-
We really now need a norobots.txt / terms of use for a persons identity to centrally state how a persons information can be not used by big tech. Something linked to indieauth perhaps?
-
Anchor bugs in Blink engine browsers
I've been looking into an issue for work where Google Chrome loads a URL ending in an anchor and scrolls to the incorrect position on the page. Imagine linking to the third heading on a page and Chrome scrolling to a indeterminable position above that. Firefox is not affected.
After ruling out all JavaScript and the particular HTML source code, it turns out that disabling the
html { scroll-behavior: smooth; }
CSS style fixes the issue. My theory so I suspect there is a race condition between determining the length of a page and position of the element while scrolling? This results in bugreports such as "Anchorlink going to the wrong place"Regular behaviour is also partially broken
What's more interesting is that blink based browsers are unable to scroll to the anchor even after the page is already loaded!
Testcase:
- load https://downloads.vandragt.com/test-long.html#test This page has an id attribute test set on the header but is otherwise plain text. Any other page will also work though.
- The page loads and the scrollposition is correctly set at the test header.
- Scroll up a paragraph or more than a screen, and refresh the page. Notice the scrollposition isn't set.
- Optionally refresh many times, or press the Enter key in the address bar to attempt to reload the page. However the scroll-position is now permanently broken until you navigate away from the page.
This results in bug-reports such as "It only goes to a place when you first enter the URL to the browser, it doesn’t go to the same place when you re-fresh the page". Together this erodes the trust in the application and honestly it's hard to believe this has not been more widely reported.
There's probably an elaborate JavaScript solution but in my opinion a browser's bugs should be fixed by the browser, because in the future when the browser fixes itself a workaround might result in incorrect behaviour. #technology
-
Lamb 0.3.0
Introducing Lamb 0.3.0 - Literally Another Micro Blog. This release brings new features, improvements, and bug fixes, making blogging even easier. The update includes Docker support, an optional
config.ini
with support for menu items to customize your installation, improved documentation, and more.Lamb offers a simple, self-hosted single-author blog with a Twitter-like interface, friction-free Markdown entry, discoverable Atom feed, hashtags support, and a 404 fallback URL feature.
Download the latest release from GitHub and provide your valuable feedback. #lamb #projects
-
0.3.0
Originally written on lamb-releases:
What's Changed
Docker support by @svandragt in #1 Added yaml PHP module requirement Documentation added to /docs
-
Here’s my July picks for my first Sixty Minutes Slice playlist. Hope you like the music!
https://open.spotify.com/playlist/6oJjyx4VW7zWJSSyR3ZIgE?si=-LuR58vbTRyEc60jyCS6_Q
-
The fixed line fiber broadband market is currently dysfunctional with too many players struggling to compete and see a return on investment. It is time for the UK industry to collaborate in a smarter way to provide all users with a better service," he said.
UK’s bigger than London.
-
Fafi 0.2.3
Fafi is a bookmark indexing and search tool.
Install the
fafi
command line app easily usingpipx install fafi
that's all that's needed, and then feed it a single URL, a text file with one URL per line, a bookmarks.html containing links (any browser's export) or--firefox
and it will detect the Firefox profile and extract its bookmarks and index them.Then search all your bookmark contents using full-text search and ranking!
New in 0.2.3
The release notes for version 0.2.3 of Fafi (Favorites Finder) include the following changes and updates:
-
Fixes pipx installs: This release addresses issues related to installing Fafi using pipx, a tool that allows you to install Python applications in isolated environments. The fixes aim to improve the installation process and ensure smoother usage of Fafi.
-
--url option: A new command-line option, "--url," has been added to Fafi. This option allows users to add single URLs directly for indexing and searching purposes. It provides a convenient way to include specific webpages in the Fafi search index.
-
--list=textfile: Another addition to the command-line options is "--list=textfile." This option enables users to specify a text file containing a list of URLs or webpage locations that should be indexed by Fafi. It offers a means to index multiple URLs at once from a single file, streamlining the indexing process.
-
Textual TUI: Fafi now includes a Textual Terminal User Interface (TUI). This feature enhances the user experience by providing a text-based interface within the command-line environment. The TUI improves interaction with Fafi, making it more intuitive and user-friendly.
-
Dependency updates: The release incorporates updates to Fafi's dependencies. These updates ensure that Fafi remains compatible with the latest versions of the libraries and packages it relies on. By keeping the dependencies up to date, Fafi benefits from bug fixes, performance enhancements, and new features introduced in those libraries.
-
-
Workaround for when poetry cannot find pyenv managed python
I use
pyenv
to managepython
versions for my projects, and usepoetry
to manage project dependencies. Poetry was unable to find the latest python version, and insisted on creating virtual envs with system python.Setting
poetry config virtualenvs.prefer-active-python true
did not work for me, and neither didpoetry env use whatever-version
:$ poetry env use 3.11 Could not find the python executable python3.11
However pyenv can list the the full path to the currently active python, which can be used as a parameter to poetry, so the following worked:
$ poetry env use $(pyenv which python) $ poetry install; poetry run python --version
Update: double check that pyenv is configuring the shell correctly --
$HOME/.pyenv/shims
should be in yourPATH
variable, and your shell runtime configuration file (such as.bashrc
/.zshrc
) should containeval "$(pyenv init -)"
Hope this helps!
-
In Sublime Text you can hold shift and select another tab and it will split the view! wow.
-
If you also find the Leave button in Slack Huddles moves about a lot at the end of meetings, you can click on the headphone toggle in the bottom of the left sidebar to leave a huddle. (or try your luck at russian roulette and press the shortcut which either starts, joins, leaves or ends a huddle)
-
Turns out
yaml_parse()
in PHP automatically parses a front matter block out of a markdown based post. -
Entry titles aren't optional in Atom feeds, how to micro blogs deal with that? Update: it seems by making the title an empty element.
-
The AI evolution seems scary until you realise most of the applications are summarised as a wrapper around the OpenAI API that does all the work, with the context provided by a prompt prefix. So with half a day's study most programmers can participate. #technology
-
Ubuntu's minimal installation appears to be the standard installation plus the removal of some packages! That's unexpected as I was trying to save installation time. #ubuntu #technology #linux
-
Map Eject to Multitasking View
So I use ElementaryOS and in version 7 you are no longer able to map just the Eject key. I like to map this to the Multitasking View (something like the macOS Expose).
The solution is to use the DConf Editor application and search for
show-desktop
. ElementaryOS repurposes the show desktop to the multitasking view. Simply set the value to['Eject']
Alternatively you can set the left-super key (windows/command) to the Multitasking View. This seems better supported.
-
Lamb 0.2
I've released Lamb 0.2, my micro blogging app that's powering this site.
What's new?
- Posts! Posts are statuses with a title. The title can be added in the front matter (front matter is parsed as an ini-string). Posts have a slug based on the title when the post was created.
- Individual statuses / posts have opengraph tags for improved sharing fidelity.
- The text editor grows to accommodate the input.
-
0.2.0
Originally written on lamb-releases:
Posts! Posts are statuses with a title. The title can be added in the front matter (front matter is parsed as an ini-string) Posts have a slug based on the title when the post was created. Individual statuses / posts have opengraph tags for improved sharing fidelity. Fixed several XSS, thanks @cameronterry
-
Anyone, regardless of coding experience can now create scripts and simple WordPress plugins:
WordPress developers who want to share their AI-assisted creations with the community have also started submitting them to WordPress.org.
We can imagine the headlines in six months when another popular site or plug-in is hacked, when both the author and the generator and the webmaster don’t understand the code, and can’t review it for security weaknesses, The current tools are proof of concept creators, but please be careful not to assume production ready code.
If you want a code review done hit up an engineer, like myself #technology #ai #wordpress
-
I've released php-activate 0.1.2, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will automatically switch to the correct PHP version after
cd
ing into the project folder. It does not require sudo, so even works in IDEs.The latest version contains only documentation changes, but I've been using this successfully for a few months, so wanted to share this more widely. #projects #phpactivate
-
Basic routing using REQUEST_URI
So for nginx it is not straightforward to setup PHP-FPM so that
PATH_INFO
is correctly populated. Lamb uses the following/index.php/some/other
type routing, where/some/other
should be thePATH_INFO
. Instead I want to make setup for a variety of web-servers straightforward, so I've switched to the more robustREQUEST_URI
. This simplifies nginx configuration and Caddy and the PHP built-in web-server are compatible.REQUEST_URI
contains everything after the domain name, including the query string, so that needs to be removed:$request_uri = '/home'; if ( $_SERVER['REQUEST_URI'] !== '/' ) { $request_uri = strtok( $_SERVER['REQUEST_URI'], '?' ); }
We can see that for a request for the root of the site,
REQUEST_URI
returns/
whereasPATH_INFO
would be empty, so the code above takes that into account. We can then deduct a router action as follows:$action = strtok( $request_uri, '/' );
Once the
$action
is known, it can be checked against an allowed list of actions:switch ( $action ) { case 'edit': ... break; default: respond_404(); break;
-
0.1.0
Originally written on lamb-releases:
Initial release! Full Changelog: https://github.com/svandragt/lamb/commits/0.1.0