<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Coding on myByways</title><link>https://myByways.com/tags/coding/</link><description>Recent content in Coding on myByways</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 15 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://myByways.com/tags/coding/index.xml" rel="self" type="application/rss+xml"/><item><title>Creating an audiobook (.m4b) with FFmpeg</title><link>https://myByways.com/post/creating-an-audiobook-m4b-with-ffmpeg/</link><pubDate>Sun, 15 Feb 2026 00:00:00 +0000</pubDate><guid>https://myByways.com/post/creating-an-audiobook-m4b-with-ffmpeg/</guid><description>&lt;p&gt;Following on from my previous TTS post using &lt;a href="https://myByways.com/post/chatterbox-turbo-tts-with-mlx-audio"&gt;Chatterbox Turbo&lt;/a&gt; (or any other TTS like &lt;a href="https://myByways.com/post/running-kokoro-tts-via-macos-containerisation-framework"&gt;Kokoro&lt;/a&gt; or &lt;a href="https://myByways.com/post/qwen3-tts-with-mlx-audio-on-macos"&gt;Qwen3-TTT&lt;/a&gt;), here is code to combine audio files in a single &lt;code&gt;.m4b&lt;/code&gt; audiobook retaining author and title metadata, chapter markers, and a cover image. Mostly this is a Python wrapper to &lt;a href="https://www.ffmpeg.org" rel="external"&gt;FFmpeg&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Chatterbox Turbo TTS with MLX-Audio</title><link>https://myByways.com/post/chatterbox-turbo-tts-with-mlx-audio/</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0000</pubDate><guid>https://myByways.com/post/chatterbox-turbo-tts-with-mlx-audio/</guid><description>&lt;p&gt;In my last post, I tried &lt;a href="https://myByways.com/post/qwen3-tts-with-mlx-audio-on-macos"&gt;Qwen3-TTS&lt;/a&gt;&amp;hellip; This time, I test &lt;a href="https://www.resemble.ai/chatterbox-turbo/" rel="external"&gt;Chatterbox Turbo by Resemble.ai&lt;/a&gt;, which is an open-source, MIT licensed, text-to-speech model with zero-shot cloning.&lt;/p&gt;</description></item><item><title>Qwen3-TTS with MLX-Audio on macOS</title><link>https://myByways.com/post/qwen3-tts-with-mlx-audio-on-macos/</link><pubDate>Mon, 02 Feb 2026 00:00:00 +0000</pubDate><guid>https://myByways.com/post/qwen3-tts-with-mlx-audio-on-macos/</guid><description>&lt;p&gt;Alibaba’s &lt;a href="https://github.com/QwenLM/Qwen3-TTS" rel="external"&gt;Qwen3-TTS&lt;/a&gt; for &lt;strong&gt;Speech Synthesis&lt;/strong&gt; (text-to-speech) was open-sourced (Apache-2.0) on 22 Jan 2026. And within the last couple of weeks, we now have Apple Silicon optimization via &lt;a href="https://github.com/Blaizzy/mlx-audio" rel="external"&gt;MLX-Audio&lt;/a&gt;. Here is code to create an audiobook from an ePub.&lt;/p&gt;</description></item><item><title>Convert animated WebP to WebM movie with Python</title><link>https://myByways.com/post/convert-animated-webp-to-webm-movie-with-python/</link><pubDate>Sun, 21 Jan 2024 00:00:00 +0000</pubDate><guid>https://myByways.com/post/convert-animated-webp-to-webm-movie-with-python/</guid><description>&lt;p&gt;In &lt;a href="https://myByways.com/post/comparing-face-ip-adapters-for-sdxl"&gt;my last post&lt;/a&gt; I mentioned converting an animated &lt;a href="https://en.wikipedia.org/wiki/WebP" rel="external"&gt;WebP&lt;/a&gt; image format into a &lt;a href="https://en.wikipedia.org/wiki/WebM" rel="external"&gt;WebM&lt;/a&gt; movie format. This post expands on how I did it.&lt;/p&gt;</description></item><item><title>Extracting images from PDF files</title><link>https://myByways.com/post/extracting-images-from-pdf-files/</link><pubDate>Sat, 06 Jan 2024 00:00:00 +0000</pubDate><guid>https://myByways.com/post/extracting-images-from-pdf-files/</guid><description>&lt;p&gt;Happy new year!&lt;/p&gt;
&lt;p&gt;Ever needed to extract images from PDFs and found both on-line and off-line tools lacking? Well, I certainly have, and here I present my Python code to extract JPGs/PNGs from PDFs, using &lt;a href="https://github.com/pymupdf/PyMuPDF" rel="external"&gt;PyMuPDF&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Run code in a macOS Sandbox</title><link>https://myByways.com/post/run-code-in-a-macos-sandbox/</link><pubDate>Sun, 11 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/run-code-in-a-macos-sandbox/</guid><description>&lt;p&gt;I sometimes test randomly downloaded code on macOS in a &lt;strong&gt;Sandbox&lt;/strong&gt; that has limited and network access. I posted about this way back in Jan 2017, &lt;a href="https://myByways.com/post/creating-a-macos-sandbox-to-run-kodi"&gt;Creating a macOS Sandbox to run Kodi&lt;/a&gt;, and this is a short refresher for me&amp;hellip;&lt;/p&gt;</description></item><item><title>Create an animated PNG</title><link>https://myByways.com/post/create-an-animated-png/</link><pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/create-an-animated-png/</guid><description>&lt;p&gt;I recently wanted to create an animated PNG, but macOS does not include any built in tools to combine multiple &lt;a href="https://en.wikipedia.org/wiki/PNG" rel="external"&gt;PNG&lt;/a&gt;s into an &lt;a href="https://en.wikipedia.org/wiki/APNG" rel="external"&gt;APNG&lt;/a&gt; file. Here’s an option using &lt;strong&gt;Python&lt;/strong&gt; source code.&lt;/p&gt;</description></item><item><title>File Date Created = Photo / video metadata</title><link>https://myByways.com/post/file-date-created-to-photo-video-metadata/</link><pubDate>Sun, 04 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/file-date-created-to-photo-video-metadata/</guid><description>&lt;p&gt;When I export photos or videos from &lt;strong&gt;Photos.app&lt;/strong&gt;, I want the file’s &lt;strong&gt;Created Date&lt;/strong&gt; (&lt;strong&gt;Created Date&lt;/strong&gt; in Finder) to be the time the photo or video was taken. Alas, this is not the way Photos works, and setting the date turned out to be more challenging than expected.&lt;/p&gt;</description></item><item><title>“Delete” (Move) to Trash in macOS Shell</title><link>https://myByways.com/post/delete-move-to-trash-in-macos-shell/</link><pubDate>Mon, 08 May 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/delete-move-to-trash-in-macos-shell/</guid><description>&lt;p&gt;A short one today: here is a function to “delete” (read: move) a file to the macOS &lt;strong&gt;Trash&lt;/strong&gt; (Bin), as a safer alternative to &lt;code&gt;rm&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>myByways Simple-SD v1.1 Python script using Safetensors</title><link>https://myByways.com/post/mybyways-simple-sd-v1-1-python-script-using-safetensors/</link><pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/mybyways-simple-sd-v1-1-python-script-using-safetensors/</guid><description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/johnslegers/epic-diffusion" rel="external"&gt;Epic Diffusion&lt;/a&gt;&lt;/strong&gt; recently came to my attention, a high-quality merge of various models by John Slegers: “Epîc Diffusion is a general purpose model based on Stable Diffusion 1.x intended to replace the official SD releases as your default model. It is focused on providing high quality output in a wide range of different styles&amp;hellip;” Figured I’d give it a spin.&lt;/p&gt;</description></item><item><title>Lite XL text editor on MacOS</title><link>https://myByways.com/post/lite-xl-text-editor-on-macos/</link><pubDate>Sat, 31 Dec 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/lite-xl-text-editor-on-macos/</guid><description>&lt;p&gt;I recently tried &lt;a href="https://lite-xl.com/" rel="external"&gt;Lite XL v2.1.0&lt;/a&gt;, a forked and updated version of the original &lt;code&gt;rxi/lite&lt;/code&gt;, “A lightweight text editor written in Lua”, on MacOS ARM. Here are some findings.&lt;/p&gt;</description></item><item><title>Lock Screen "Launcher" Widget with Scriptable</title><link>https://myByways.com/post/lock-screen-launcher-widget-with-scriptable/</link><pubDate>Fri, 02 Dec 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/lock-screen-launcher-widget-with-scriptable/</guid><description>&lt;p&gt;iOS 16 introduced new &lt;strong&gt;lock screen widgets&lt;/strong&gt;! Rather that installing various third party widdgets, I want to create my own using &lt;a href="https://scriptable.app/" rel="external"&gt;Scriptable&lt;/a&gt;. Here is a simple “universal” widget to launch an application or a &lt;strong&gt;Shortcut&lt;/strong&gt; (bonus: or even the home screen too!)&lt;/p&gt;</description></item><item><title>myByways Simple-SD v1.0 Python script</title><link>https://myByways.com/post/mybyways-simple-sd-python-script/</link><pubDate>Sun, 09 Oct 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/mybyways-simple-sd-python-script/</guid><description>&lt;p&gt;I refactored my &lt;a href="https://myByways.com/post/adding-clipseg-automatic-masking-to-stable-diffusion"&gt;previous &lt;strong&gt;Stable Diffusion&lt;/strong&gt; code&lt;/a&gt;, to clean up, OO it a little, and add new features like tiling, upscaling, PNG metadata. As I mentioned before, I don’t understand AI/ML&amp;hellip; but I do understand programming! So here is my new, more elegant &lt;strong&gt;Simple-SD v1.0&lt;/strong&gt; Python script.&lt;/p&gt;</description></item><item><title>Adding CLIPSeg automatic masking to Stable Diffusion</title><link>https://myByways.com/post/adding-clipseg-automatic-masking-to-stable-diffusion/</link><pubDate>Wed, 28 Sep 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/adding-clipseg-automatic-masking-to-stable-diffusion/</guid><description>&lt;p&gt;I have more ideas for &lt;strong&gt;Stable Diffusion&lt;/strong&gt;. My nights and weekends are consumed! This time: For inpainting, why create a mask image manually, when A.I. can automatically build a mask from a text prompt? Someone much smarter has already &lt;a href="https://arxiv.org/abs/2112.10003" rel="external"&gt;published a paper (arXiv:2112.10003 [cs.CV])&lt;/a&gt;, with source code, to do just this!&lt;/p&gt;</description></item><item><title>Stable Diffusion script with inpainting mask</title><link>https://myByways.com/post/stable-diffusion-script-with-in-painting-mask/</link><pubDate>Mon, 26 Sep 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/stable-diffusion-script-with-in-painting-mask/</guid><description>&lt;p&gt;More &lt;strong&gt;Stable Diffusion!&lt;/strong&gt; This time &lt;em&gt;attempting&lt;/em&gt; to add inpainting / masking based on my previous code, to merge both &lt;code&gt;txt2img.py&lt;/code&gt; and &lt;code&gt;img2img.py&lt;/code&gt; capabilities, disregarding the out-of-box &lt;code&gt;inpainting.py&lt;/code&gt; code, which does not have parameters for positive or negative prompts. Keyword being &lt;em&gt;attempting&lt;/em&gt;&amp;hellip;&lt;/p&gt;</description></item><item><title>My simplified Stable Diffusion Python script</title><link>https://myByways.com/post/my-simplified-stable-diffusion-python-script/</link><pubDate>Wed, 21 Sep 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/my-simplified-stable-diffusion-python-script/</guid><description>&lt;p&gt;I’ve been playing around with the &lt;a href="https://github.com/CompVis/stable-diffusion" rel="external"&gt;Stable Diffusion&lt;/a&gt; scripts a little (to be exact, &lt;a href="https://github.com/bfirsh/stable-diffusion" rel="external"&gt;Ben Firshman’s version&lt;/a&gt;). To help me understand the script, I decided to re-write it the way I prefer to use it&amp;hellip; either breaking or optimizing it in the process :P&lt;/p&gt;</description></item><item><title>macOS Automator PDF Actions</title><link>https://myByways.com/post/macos-automator-pdf-actions/</link><pubDate>Wed, 31 Aug 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/macos-automator-pdf-actions/</guid><description>&lt;p&gt;Here is a &lt;strong&gt;macOS Automator&lt;/strong&gt; script to watermark a PDF, and also set metadata like author and title. Followed by a more advanced script to do all that an also set an &lt;strong&gt;owner password&lt;/strong&gt; and access permissions&amp;hellip; auto-magically.&lt;/p&gt;</description></item><item><title>Script to re-map MacBook Pro function keys</title><link>https://myByways.com/post/script-to-re-map-macbook-pro-function-keys/</link><pubDate>Sun, 19 Jun 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/script-to-re-map-macbook-pro-function-keys/</guid><description>&lt;p&gt;In &lt;a href="https://myByways.com/post/remapping-physical-function-keys-on-macbook-pros"&gt;my last post, “Re-mapping physical function keys on MacBook Pros”&lt;/a&gt; I used the &lt;code&gt;hidutil&lt;/code&gt; tool to re-map the function keys on a Mac without a touchbar. I’ve since created a script to more easily apply changes.&lt;/p&gt;</description></item><item><title>Simple fun: tty-solitaire</title><link>https://myByways.com/post/simple-fun-tty-solitaire/</link><pubDate>Sun, 12 Jun 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/simple-fun-tty-solitaire/</guid><description>&lt;p&gt;I’ve not posted anything in a long time, so I thought I’d dig up something from a long time ago. Once boring day, many moons ago, I stumbled upon a simple console-based Solitaire game, &lt;a href="https://github.com/mpereira/tty-solitaire/" rel="external"&gt;tty-solitaire&lt;/a&gt; by Murilo Pereira.&lt;/p&gt;</description></item><item><title>Shortcut to convert image format and paste - redux</title><link>https://myByways.com/post/shortcut-to-convert-image-format-and-paste-redux/</link><pubDate>Fri, 11 Feb 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/shortcut-to-convert-image-format-and-paste-redux/</guid><description>&lt;p&gt;I was not satisfied with my last &lt;a href="https://myByways.com/post/shortcut-to-convert-image-format-and-paste"&gt;macOS Shortcut to convert image format and paste&lt;/a&gt;. The simple version forced me to choose between PNG and JPEG, and the complex version was too slow - specifically, the &lt;kbd&gt;Find All Windows&lt;/kbd&gt; action. So here we go again&amp;hellip;&lt;/p&gt;</description></item><item><title>Remove address bar in Firefox child windows</title><link>https://myByways.com/post/remove-address-bar-in-firefox-windows/</link><pubDate>Fri, 21 Jan 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/remove-address-bar-in-firefox-windows/</guid><description>&lt;p&gt;I use JavaScript bookmarklets in &lt;a href="https://www.mozilla.org/en-US/firefox/new/" rel="external"&gt;Mozilla Firefox&lt;/a&gt; to open my email, calendar, chat, etc. in pop-up child windows without a toolbar or menu bar. I do this in order to save screen real-estate, and to prevent me from using those windows for browsing and keep them visible all the time. I’ve been wondering how to have pop-up windows without the address bar&amp;hellip;.&lt;/p&gt;</description></item><item><title>New look for the new year 2022</title><link>https://myByways.com/post/new-look-for-the-new-year-2022/</link><pubDate>Sat, 01 Jan 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/new-look-for-the-new-year-2022/</guid><description>&lt;p&gt;&lt;span class="has-text-danger"&gt;Happy New Year!&lt;/span&gt; A big welcome to 2022! I’ve finally updated the look of my blog with a new theme. Well, not really&amp;hellip; you see, I’m not very creative, and so, my theme pretty much remains the same&amp;hellip; just more purple.&lt;/p&gt;</description></item><item><title>Sending keystrokes to an application using Shortcuts for macOS Monterey</title><link>https://myByways.com/post/sending-keystrokes-to-an-application-using-shortcuts-for-macos-monterey/</link><pubDate>Fri, 29 Oct 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/sending-keystrokes-to-an-application-using-shortcuts-for-macos-monterey/</guid><description>&lt;p&gt;I’ve been trying out &lt;a href="https://developer.apple.com/videos/play/wwdc2021/10232/" rel="external"&gt;Shortcuts on macOS 12 Monterey&lt;/a&gt;! I have written about &lt;strong&gt;Shortcuts on iOS/iPadOS&lt;/strong&gt; in the past, so was keen to migrate my automation scripts from &lt;strong&gt;Automator&lt;/strong&gt; or &lt;code&gt;osascript&lt;/code&gt; to Shortcuts. Here is the first one: A Shortcut plus global hotkey to an application, leveraging AppleScript/JXA.&lt;/p&gt;</description></item><item><title>Extracting embedded ZIPs from Office documents</title><link>https://myByways.com/post/extracting-embedded-zips-from-office-documents/</link><pubDate>Tue, 10 Aug 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/extracting-embedded-zips-from-office-documents/</guid><description>&lt;p&gt;I have a plethora of &lt;strong&gt;Bash&lt;/strong&gt; scripts littered throughout my filesystem, many written for one specific purpose and promptly forgotten about (often, just named &lt;code&gt;go.sh&lt;/code&gt;!) I thought I share one today - a script to extract embedded ZIP files from Microsoft Office documents created in Windows.&lt;/p&gt;</description></item><item><title>Padding VS Code Touch Bar Extension Icons</title><link>https://myByways.com/post/padding-vs-code-touch-bar-extension-icons/</link><pubDate>Sat, 07 Aug 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/padding-vs-code-touch-bar-extension-icons/</guid><description>&lt;p&gt;A couple of posts ago, in my (rather unique, if I may say so myself) &lt;a href="https://myByways.com/post/a-zero-code-vs-code-touch-bar-extension-for-markdown"&gt;zero-code VS Code Touch Bar Extension for Markdown&lt;/a&gt;, I used the standard Apple icons in the &lt;a href="https://developer.apple.com/design/resources/#sf-symbols" rel="external"&gt;SF Symbols set&lt;/a&gt;. I found them a bit too large for the touchbar, and wated to shirink them slightly by padding them with extra pixels around the image.&lt;/p&gt;</description></item><item><title>The correct way to create a VS Code Touch Bar Extension</title><link>https://myByways.com/post/the-correct-way-to-create-a-vs-code-touch-bar-extension/</link><pubDate>Sat, 24 Jul 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/the-correct-way-to-create-a-vs-code-touch-bar-extension/</guid><description>&lt;p&gt;This is part two, deploying a &lt;a href="https://code.visualstudio.com/" rel="external"&gt;Visual Studio Code&lt;/a&gt; touchbar extension for Markdown notes, using the normal “correct” development method. I’d suggest referring to &lt;a href="https://myByways.com/post/creating-a-vs-code-touch-bar-extension-for-markdown"&gt;part one, for my much simpler, zero-code method&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>A zero-code VS Code Touch Bar Extension for Markdown</title><link>https://myByways.com/post/a-zero-code-vs-code-touch-bar-extension-for-markdown/</link><pubDate>Fri, 23 Jul 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/a-zero-code-vs-code-touch-bar-extension-for-markdown/</guid><description>&lt;p&gt;This is the first part of a two part series on deploying your own touchbar extension for &lt;a href="https://code.visualstudio.com/" rel="external"&gt;Visual Studio Code&lt;/a&gt;, designed mainly to work with Markdown notes. This post gives you a shortcut method with &lt;strong&gt;zero code&lt;/strong&gt;! The next post will details a more “correct” method. If you don’t already realize - this applies to MacBooks with Touch bars running macOS only.&lt;/p&gt;</description></item><item><title>AppleScript to change clipboard image format</title><link>https://myByways.com/post/applescript-to-change-clipboard-image-format/</link><pubDate>Sat, 24 Apr 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/applescript-to-change-clipboard-image-format/</guid><description>&lt;p&gt;For the longest time, I’ve struggled to get the macOS version of &lt;strong&gt;Microsoft Office&lt;/strong&gt; (Word, PowerPoint, Excel) to paste images as &lt;strong&gt;PNG&lt;/strong&gt; or &lt;strong&gt;JPEG&lt;/strong&gt;, instead of the default &lt;strong&gt;TIFF&lt;/strong&gt;. TIFFs make the files far larger than they need to be! I’ve resorted to macros, shell scripts, Quick Actions&amp;hellip; all paste PNGs (lossless) into MS Office! But I just found another method with &lt;a href="https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html" rel="external"&gt;AppleScript&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>A few of my bookmarklets</title><link>https://myByways.com/post/a-few-of-my-bookmarklets/</link><pubDate>Sun, 18 Apr 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/a-few-of-my-bookmarklets/</guid><description>&lt;p&gt;I have a few Javascript &lt;strong&gt;bookmarklets&lt;/strong&gt; that I thought I’d share. &lt;a href="https://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks" rel="external"&gt;Bookmarklets&lt;/a&gt; are short snippets of JavaScript code that run in the context of the current web page in the browser. I prefer them over extensions since I can see what the code does. There are plenty on the web, here are a few of mine.&lt;/p&gt;</description></item><item><title>Migrating from bash shell scripts to Python</title><link>https://myByways.com/post/migrating-from-bash-shell-scripts-to-python/</link><pubDate>Thu, 11 Mar 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/migrating-from-bash-shell-scripts-to-python/</guid><description>&lt;p&gt;I recently wanted to migrate from a &lt;strong&gt;Bash 3&lt;/strong&gt; shell script to &lt;strong&gt;Python 3&lt;/strong&gt;. This is nothing but a brain dump comparing a few bits and bobs.&lt;/p&gt;</description></item><item><title>Hide Firefox Toolbar and Tabs in Fullscreen</title><link>https://myByways.com/post/hide-firefox-toolbar-and-tabs-in-fullscreen/</link><pubDate>Thu, 15 Oct 2020 00:00:00 +0000</pubDate><guid>https://myByways.com/post/hide-firefox-toolbar-and-tabs-in-fullscreen/</guid><description>&lt;p&gt;I use macOS spaces (virtual desktops) to arrange the various apps I frequently use. I have one space setup with two Firefox windows, in &lt;strong&gt;fullscreen Split View&lt;/strong&gt; mode. But by default, Firefox windows are not really “full screen” for me, in that the tabs, toolbar and bookmarks bar will still be displayed. Here is my workaround to force the browser to full screen.&lt;/p&gt;</description></item><item><title>CSS tips to avoid Javascript</title><link>https://myByways.com/post/css-tips-to-avoid-javascript/</link><pubDate>Fri, 03 Apr 2020 00:00:00 +0000</pubDate><guid>https://myByways.com/post/css-tips-to-avoid-javascript/</guid><description>&lt;p&gt;Recently I’ve been building a few web sites without JavaScript where possible, relying instead on modern browser support for CSS.&lt;/p&gt;
&lt;p&gt;Here are some things I’ve figured out, including toggling the NavBar burger dropdown, smooth scrolling, showing and hiding modal dialogs with transitions!&lt;/p&gt;</description></item><item><title>PowerShell Pipeline to Rename Files</title><link>https://myByways.com/post/powershell-pipeline-to-rename-files/</link><pubDate>Mon, 30 Dec 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/powershell-pipeline-to-rename-files/</guid><description>&lt;p&gt;For me, Microsoft &lt;strong&gt;PowerShell&lt;/strong&gt; is hard! I can’t wrap my mind around &lt;a href="https://docs.microsoft.com/en-us/powershell/scripting/learn/understanding-the-powershell-pipeline?view=powershell-6" rel="external"&gt;data pipelines&lt;/a&gt; (&lt;code&gt;|&lt;/code&gt;). Instead, I keep reverting to if/then, loops and other traditional programming paradigms, similar to what I’d do in UNIX shell!&lt;/p&gt;</description></item><item><title>Single Page Bulma template with Smooth Scroll and Scroll Spy JavaScript</title><link>https://myByways.com/post/single-page-bulma-template-with-smooth-scroll-and-scroll-spy-javascript/</link><pubDate>Wed, 30 Oct 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/single-page-bulma-template-with-smooth-scroll-and-scroll-spy-javascript/</guid><description>&lt;p&gt;I was building a single page website using &lt;a href="https://bulma.io" rel="external"&gt;Bulma&lt;/a&gt;, and I wanted to achieve effects similar to what I was familiar with using &lt;a href="https://startbootstrap.com/themes/creative" rel="external"&gt;Bootstrap’s Creative one page theme&lt;/a&gt;. As you know, Bulma (mostly) does not provide any &lt;strong&gt;JavaScript&lt;/strong&gt; code, so I had to code the &lt;strong&gt;Smooth Scrolling&lt;/strong&gt; and &lt;strong&gt;Scroll Spy&lt;/strong&gt; features I missed. I intentionally avoided &lt;a href="https://jquery.com/" rel="external"&gt;jQuery&lt;/a&gt;! So I present my solution using plain-old JavaScript.&lt;/p&gt;</description></item><item><title>Word Macro to paste MS Office Drawing / TIFF image as PNG</title><link>https://myByways.com/post/word-macro-to-paste-ms-office-drawing-tiff-image-as-png/</link><pubDate>Sun, 13 Oct 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/word-macro-to-paste-ms-office-drawing-tiff-image-as-png/</guid><description>&lt;p&gt;I really don’t know how to explain today’s post. In short: I want to copy drawings and images out of &lt;strong&gt;Microsoft Office&lt;/strong&gt; in PNG format. On macOS, copy-and-paste seems to prefer the TIFF format, resulting in large Office files. I’d rather the images be converted to PNG, preserving transparency but providing high compression. However, this is more complicated than it seems, because of limitations in Office and &lt;strong&gt;PowerPoint&lt;/strong&gt; in particular&amp;hellip;&lt;/p&gt;</description></item><item><title>Touch Bar Quick Action Scripts</title><link>https://myByways.com/post/touch-bar-quick-action-scripts/</link><pubDate>Wed, 18 Sep 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/touch-bar-quick-action-scripts/</guid><description>&lt;p&gt;Just sharing some &lt;strong&gt;Automator&lt;/strong&gt; scripts I use for &lt;strong&gt;Touch Bar Quick Actions&lt;/strong&gt; showcasing three different methods - using pre-defined &lt;strong&gt;Actions&lt;/strong&gt;, using &lt;strong&gt;AppleScripts&lt;/strong&gt; and using &lt;strong&gt;Shell&lt;/strong&gt; scripts.&lt;/p&gt;</description></item><item><title>Automatically setup a development stack with Appsody</title><link>https://myByways.com/post/automatically-setup-a-development-stack-with-appsody/</link><pubDate>Thu, 05 Sep 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/automatically-setup-a-development-stack-with-appsody/</guid><description>&lt;p&gt;In a previous series of posts, I described how I &lt;a href="https://myByways.com/post/setting-up-node-js-in-a-docker-container"&gt;set up Node.js in a Docker container&lt;/a&gt; for development on my macBook. It’s quite a lot of steps!&lt;/p&gt;
&lt;p&gt;Well, there is a much simpler way - introducing &lt;a href="https://appsody.dev" rel="external"&gt;Appsody&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Forcing Dark Mode with prefs-color-scheme Media Query</title><link>https://myByways.com/post/forcing-dark-mode-with-prefs-color-scheme-media-query/</link><pubDate>Sun, 11 Aug 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/forcing-dark-mode-with-prefs-color-scheme-media-query/</guid><description>&lt;p&gt;A few posts ago, I described how to set &lt;a href="https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query"&gt;Dark Mode with the &lt;code&gt;prefs-color-scheme&lt;/code&gt; Media Query&lt;/a&gt;. The browser will detect the OS Dark Mode setting (set in the &lt;strong&gt;Windows Control Panel&lt;/strong&gt; or &lt;strong&gt;macOS System Preferences&lt;/strong&gt;) and use the appropriate CSS Media Query rule. But what if you want to programmatically set either Dark or Light mode irrespective of the OS setting?&lt;/p&gt;</description></item><item><title>Building and packaging Wine 4.12.1 (32-bit and 64-bit) automatically</title><link>https://myByways.com/post/building-and-packaging-wine-4-12-1-32-bit-and-64-bit-automatically/</link><pubDate>Wed, 31 Jul 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/building-and-packaging-wine-4-12-1-32-bit-and-64-bit-automatically/</guid><description>&lt;p&gt;For a while now, I’ve been posting about compiling &lt;a href="https://www.winehq.org/" rel="external"&gt;Wine&lt;/a&gt; on macOS, starting with &lt;a href="https://myByways.com/post/compiling-wine-from-scratch-on-macos-with-retina-mode"&gt;Wine 1.9 in October 2016&lt;/a&gt;, then automating the compile for &lt;a href="https://myByways.com/post/automated-script-to-compile-wine-2-9-from-scratch"&gt;Wine 2.9 32-bit in May 2017&lt;/a&gt;. Now it’s July 2019, and this is probably my last post on the subject - a fully automated script to download and compile Wine 4.12.1 (released 7 July 2019) 32-bit and 64-bit on macOS.&lt;/p&gt;</description></item><item><title>Dark Mode with prefers-color-sheme Media Query</title><link>https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query/</link><pubDate>Wed, 03 Jul 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query/</guid><description>&lt;p&gt;&lt;strong&gt;Dark Mode&lt;/strong&gt; is all the rage with desktop and mobile OS’es right now. Interestingly, modern browsers can detect the OS dark mode preference, and use a different set of CSS styles respectively for light or dark modes! Here’s how I updated &lt;a href="https://myByways.com/post/my-custom-grav-theme"&gt;My custom Grav theme&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>My custom Grav theme</title><link>https://myByways.com/post/my-custom-grav-theme/</link><pubDate>Mon, 20 May 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/my-custom-grav-theme/</guid><description>&lt;p&gt;I re-designed my blog template using a new CSS framework called &lt;strong&gt;Bluma&lt;/strong&gt;, re-developed all &lt;strong&gt;JavaScript&lt;/strong&gt; without &lt;strong&gt;jQuery&lt;/strong&gt; and customized some plugins. This was quite a journey, so this post is going to be quite long too!&lt;/p&gt;</description></item><item><title>Prototyping with a Node-RED container</title><link>https://myByways.com/post/prototyping-with-a-node-red-container/</link><pubDate>Tue, 16 Apr 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/prototyping-with-a-node-red-container/</guid><description>&lt;p&gt;If the preceding posts on &lt;strong&gt;Node.js&lt;/strong&gt; and &lt;strong&gt;MongoDB&lt;/strong&gt; have been too complex for you, let me introduce you to a simpler drag-and-drop “flow-editor,” &lt;a href="https://nodered.org/" rel="external"&gt;Node-RED.&lt;/a&gt;. It was developed and open-sourced by IBM, and is now hosted by the &lt;a href="https://js.foundation/" rel="external"&gt;OpenJS Foundation&lt;/a&gt; (the same foundation that hosts projects like &lt;strong&gt;jQuery&lt;/strong&gt;, and &lt;strong&gt;Dojo&lt;/strong&gt;). I’ve used &lt;strong&gt;Node-RED&lt;/strong&gt; for quick prototypes and demos, as it’s easy to explain each step of the flow. It saves a lot of coding effort and reduces errors buy providing built-in and pre-built third-party “nodes”.&lt;/p&gt;</description></item><item><title>Batch file to list deleted files</title><link>https://myByways.com/post/batch-file-to-list-deleted-files/</link><pubDate>Thu, 12 Jul 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/batch-file-to-list-deleted-files/</guid><description>&lt;p&gt;Well, it turns out that after creating a &lt;a href="https://myByways.com/post/powershell-to-list-deleted-files"&gt;PowerShell script to list deleted files&lt;/a&gt; (part 1) and another &lt;a href="https://myByways.com/post/powershell-to-monitor-for-deleted-renamed-or-moved-files"&gt;PowerShell script to monitor for deleted, renamed or moved files&lt;/a&gt; (part 2), I&amp;rsquo;ve decided to revert to a simple, batch file instead because running a &lt;strong&gt;batch file&lt;/strong&gt; is so much easier than &lt;strong&gt;PowerShell&lt;/strong&gt;!&lt;/p&gt;</description></item><item><title>PowerShell to monitor for deleted, renamed or moved files (part 2)</title><link>https://myByways.com/post/powershell-to-monitor-for-deleted-renamed-or-moved-files/</link><pubDate>Sun, 17 Jun 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/powershell-to-monitor-for-deleted-renamed-or-moved-files/</guid><description>&lt;p&gt;This is part 2, of my attempt to &amp;ldquo;sync&amp;rdquo; photos I deleted on my desktop to my SD card (you can &lt;a href="https://myByways.com/post/powershell-to-list-deleted-files"&gt;read part 1 first&lt;/a&gt;). In this post, I try to use &lt;strong&gt;PowerShell&lt;/strong&gt; with .NET framework to (try) monitor for file system changes, and output to a batch file that &amp;ldquo;replicates&amp;rdquo; the &lt;code&gt;ren&lt;/code&gt; (rename) and &lt;code&gt;del&lt;/code&gt; (delete) to files and folders.&lt;/p&gt;</description></item><item><title>PowerShell to list deleted files (part 1)</title><link>https://myByways.com/post/powershell-to-list-deleted-files/</link><pubDate>Sat, 16 Jun 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/powershell-to-list-deleted-files/</guid><description>&lt;p&gt;I have an unusual workflow when copying photos from my camera&amp;rsquo;s SD card to my Windows desktop. For any photos I my desktop, I want to also delete on the SD card. In this post (part 1 of 2), I describe my &lt;strong&gt;PowerShell&lt;/strong&gt; script to &amp;ldquo;repeat&amp;rdquo; what I deleted on the desktop on the SD card. In &lt;a href="https://myByways.com/post/powershell-to-monitor-for-deleted-renamed-or-moved-files"&gt;my next post, part 2&lt;/a&gt;, I expand the &lt;strong&gt;PowerShell&lt;/strong&gt; script to (try) monitor for file system changes instead.&lt;/p&gt;</description></item><item><title>A bash script to search a CSV file</title><link>https://myByways.com/post/bash_script_to_search_csv_file/</link><pubDate>Sat, 19 May 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/bash_script_to_search_csv_file/</guid><description>&lt;p&gt;I sometimes need to search a huge CSV file (13 MB), containing 21,000 rows and roundabout 40 columns, which &lt;strong&gt;Numbers&lt;/strong&gt; takes half a minute to open. All I need to do is search and display the results of a few columns only&amp;hellip; so I wrote a &lt;strong&gt;bash&lt;/strong&gt; script to do this for me - and I was quite specific in that I wanted the results in &lt;strong&gt;color!&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Convert SVG to PNG using your browser</title><link>https://myByways.com/post/convert-svg-to-png-using-your-browser/</link><pubDate>Sat, 23 Sep 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/convert-svg-to-png-using-your-browser/</guid><description>&lt;p&gt;Lots of web pages now rely on &lt;strong&gt;SVG&lt;/strong&gt; instead of &lt;strong&gt;PNG&lt;/strong&gt; or &lt;strong&gt;JPG&lt;/strong&gt; images. SVG stands for &lt;a href="https://en.wikipedia.org/wiki/SVG" rel="external"&gt;Scalable Vector Graphics&lt;/a&gt;, an XML-based vector image format that scales well, unlike bitmap images (bitmaps become pixelated when up-sized). I recently wanted a quick way to convert a SVG to PNG, and discovered modern browsers (read: &lt;strong&gt;Chrome&lt;/strong&gt; and &lt;strong&gt;Firefox&lt;/strong&gt;) can do this with a simple bit of code.&lt;/p&gt;</description></item><item><title>Text Manipulation Cheat Sheet</title><link>https://myByways.com/post/text-manipulation-cheat-sheet/</link><pubDate>Mon, 26 Jun 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/text-manipulation-cheat-sheet/</guid><description>&lt;p&gt;I recently had the &amp;ldquo;opportunity&amp;rdquo; to perform some text manipulation to get data from a huge log file into a spreadsheet. I had done this sort of work a long time ago as a developer, but had forgotten over the years. So I decided to compile a &lt;strong&gt;text manipulation cheat-sheet&lt;/strong&gt; for macOS.&lt;/p&gt;</description></item><item><title>Screen capture script for retina display with PNG optimization</title><link>https://myByways.com/post/screen-capture-script-for-retina-display-with-png-optimization/</link><pubDate>Mon, 19 Oct 2015 00:00:00 +0000</pubDate><guid>https://myByways.com/post/screen-capture-script-for-retina-display-with-png-optimization/</guid><description>&lt;p&gt;Forget the complex or manual steps, or costly tools to get screen shots scaled down from a retina display. I have a &lt;strong&gt;shell script&lt;/strong&gt; that triggers an interactive window screen capture, saves the screen shot (assumed to be 2x retina display), re-sizes it to 1x and compresses the PNG further! Best of all, it does not require paid software or Automator.&lt;/p&gt;</description></item></channel></rss>