Added subdomain to cloudflare tunnel
Turns out LLMs know me by an old subdomain I forgot to add to cloudflare's tunnel config. Just added it. See saved chat under filename "Arts Kupietz 404 Issue" in local admin folder.
Turns out LLMs know me by an old subdomain I forgot to add to cloudflare's tunnel config. Just added it. See saved chat under filename "Arts Kupietz 404 Issue" in local admin folder.
[code]awk ' /^## / { if (file) close(file) title = substr($0, 4) gsub(/[^a-zA-Z0-9 _-]/, "", title) gsub(/ /, "_", title) file = title ".md" } file { print > file } ' input.md[/code] First, cd into the same folder as the file (here called input.md. Then the above will generate titled .md documents from every section that starts with ##.
This is a work-in-progress inspired by a recent conversation.
In the "separation model" in FileMaker, where data tables live in separate files from an "interface file" containing visual layouts that display the data to the user, used to be widely recommended as a development convention. However, many developers have found that it has significant drawbacks. This is a scratchpad list of those drawbacks as I encounter them.
1. Duplicate relationship graphsIn practice, relationships depend on context, and this is provided by table occurrences that layouts are built on. You may need a portal on a layout... that means the relationship must be in the interface file. But you may have a calculated field in the parent record that counts, summarizes, or otherwise performs an aggregate operation on the related records. That means the relationship must be in the data file. Neither of these is unusual at all. So you…
Today Comcast (boo! hiss!) did some work in my neighborhood and knocked my server offline. I had a long, painful chat session with ChatGPT which ended with me eventually getting set up with cloudflare tunnels instead of using ddclient to update my IP address. The whole chat and terminal session are saved locally in my hard drive in the backups/admin > troubleshooting logs folder in case I ever need to recreate what happened.
To quickly check to http return code for a bunch of your hosted domains, enter this in bash:
[code]for host in \ domain.com www.domain.com \ domain2.info www.domain2.info \ domain3.com www.domain3.com do code=$(curl -k -sS -o /dev/null -w '%{http_code} %{redirect_url}' "https://$host/") printf "%-26s %s\n" "$host" "$code" done[/code]
On my iPhone, I had Siri dication suddenly start inserting bogus commas everywhere when I never said "comma". You can turn this off by going to settings > general > keyboard > dictation and turning off the auto-punctuation switch.
If your phone and Mac appear to be able to see each other over Airdrop, but every time you try to send photos from your phone to your Mac the phone sits on "waiting" and the photos never transfer, try picking "Force quit..." from the Apple icon menu in the upper left of your window on the Mac, select "Finder", hit the "Relaunch" button, wait a moment for the Finder to restart, and try transferring again.
Here's a CSS customization feature. Have fun getting it to work!
Have to leave the app to customize CSS. Why can't you save snippets in the app?? Overall, it feels like they intentionally make it as difficult and roundabout as possible to use.
And of course I followed the instructions, created the snippet in the secondary text editor Obsidian makes you keep around if you want to do things like this, quit the app, reopened it, and... it didn't work. Because, of course it didn't work. Why would following the instructions WORK, when it's so much more of a waste of time if it doesn't? I'm so glad they made this so complicated. This is so much harder than if they just had a place in the preferences to enter custom CSS, and, who doesn't love things to be as hard as possible?
If you're like me, you loathe and despise the toxic mental ordure that YouTube often plasters up and down the right side of each video page, such as POLITICAL DEMAGOGUERY in MIXED CAPS to PIQUE your OUTRAGE enough to KEEP YOU WATCHING YOUTUBE instead of doing something PRODUCTIVE! [insert thumbnail of someone looking amazed here.]
At a certain point, I started to notice that there was more likely to be things I didn't even want to know existed in that section than anything I actually wanted to see. So, I added a simple rule to the uBlock Origin browser plugin that hides that section of the page:
[code]!https://www.youtube.com www.youtube.com###related[/code]
And that's it. That's all you need to add. No more "related videos" section.
While I was at it, I added a rule to block the "suggested videos" thumbnails that appear at the end of videos, by…
If the web server is slow, detect a SYN flood by netstat -ant | grep :443 | grep SYN_RECV to show the IP addresses leaving it hanging. Hint: If you're behind a reverse proxy, and that shows IP addresses that aren't the proxy's, then your IP is being hit directly. To find out how many IPs are hanging, do netstat -ant | grep :443 | grep SYN_RECV | wc -l. If you do it a few times and the number is increasing, you may be under attack. If it's over 100, that's suspicious, but manageable and the server can usually handle it, especially if you have SYN cookies activated. If it's over 1000, you're under attack.
Run this on the server for sql tuneup recommendations to my.cnf.
[code]wget http://mysqltuner.pl/ -O mysqltuner.pl perl mysqltuner.pl[/code]
Reddit collapses comments from blocked users so you have to click to read them, but does not hide them.
Add this custom rule to uBlock origin to completely hide comments from blocked users.
! https://www.reddit.com - hide blocked user
www.reddit.com##shreddit-comment.relative:has(.text-neutral-content-weak:has-text(Blocked User))
Firefox as of v 148 (actually a bit earlier than that, but that's what I'm on right now) frequently decides not to load pages anymore. You enter a URL or click on a link and get the status message "Waiting for [URL]..." and you can wait as long as you care to.
When this begins, your only choice is to restart Firefox.
Here is a list of "solutions" to the problem from around the web, which I have tried and found do not fix the problem:
• Turning off DNS-over-HTTPS in Firefox Settings
• Flushing MacOS's DNS cache.
• Going to about:networking and clearing Firefox's DNS cache
• Going into about:config and changing network.dns.disableIPv6 from false to true
• Opening in "troubleshooting mode" or disabling all extensions
• Turning VPN off
• Turning VPN on
Long story short, I got a message from a user that audio playlists were working in Firefox but not Chrome. The Chrome console had an error that "jQuery" wasn't defined, but typing jQuery into console did show a function definition. Turns out, in Lightspeed Cache's JS Delayed Includes, I had entered the word jquery by itself on a line, with a note to myself that something was causing a browser flash if I didn't do that. But removing this made the playlist shortcodes work on Chrome again. Ergo: don't defer jQuery.
I uses this shortcut to dictate my shopping list into the iOS Reminders "Shopping" list. It breaks spoken lists on the word "and" to create separate shopping list items.
So I might run the shortcut, say the phrase "pickles and hot dogs and mustard", and it will add "pickles", "hot dogs", and "mustard" as separate checkbox items to the Shopping list in Reminders. It's handy for rattling off my shopping list as I'm staring into my fridge.
Obviously you need a list called "Shopping" set up in your Reminders app.
This shortcut executes the following steps:
Dictated Text by Custom and - splits the text into a list with "and" as the delimiterSplit Text - begins the loop that adds…Shift+esc is the keystroke that will open Firefox's process manager tab.
SSHing into a local MacOS machine at address "macbook.local", I suddenly got this:
[code]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:oKCEu3pDdq7xBhSPZwOzR2q0eWTvfphtvn3D4Bjz8v4. Please contact your system administrator. Add correct host key in /Users/username/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/username/.ssh/known_hosts:147 Host key for macbook.local has changed and you have requested strict checking. Host key verification failed.[/code]
The solution was to run ssh-keygen -R macbook.local then try the ssh again. Then it asked me whether or not to accept the key, instead of rejecting it:
[code]$ ssh username@macbook.local The authenticity of host 'macbook.local (fe80::1890:fd32:c304:69cd%en0)' can't be established. ED25519 key fingerprint is SHA256:oKCEu3pDdq7xBhSPZwOzR2q0eWTvfphtvn3D4Bjz8v4.…
Apple's quarantine system can cause this. Try
[code]chmod +x com.apple.quarantine /path/to/script.sh xattr -d com.apple.quarantine /path/to/script.sh[/code]
In my experience only the xattr is needed but the chmod might help and couldn't hurt.
If CSS animations cause a layout shift even if they're on compositable ettributes, look for clip paths, overflow:hidden, or css filters on them or their ancestors.
According to the installer, to enable PHP 8.4 FPM in Apache2 do:
a2enmod proxy_fcgi setenvif
a2enconf php8.4-fpm
So, I had a crazy problem. You'll notice that there's various draggable elements on this site... such as the "Kupietools" plugin tabs seen at left, the occasional "the site is being worked on right now" notices that pop up, etc. You can drag them around with your mouse.
This is done with a plugin (also available as a standalone javascript module, a few versions behind the plugin as I write this) that retrofits code onto various HTML elements by giving the plugin the classnames it needs to make interactive.
I was doing some optimization on the site loading to speed things up, such as getting WordPress to load a lot of CSS file late so as not to interfere with initial page load stats. (This is a whole art, beyond the scope of this article.)
Suddenly…
I got the error "The number of lookups on your SPF record exceed the allowed limit of 10. This will result in emails failing SPF authentication" in my Cloudflare DNS dashboard.
My spx record for, say, kupietz.com was "v=spf1 include:_spf.myEmailHost.com include:kupietz.com ~all"
Turns out, the problem is, every include can get parsed to be multiple servers. the include:kupietz.com apparently causes a recursive loop, creating more than 10 lookups. I updated it to "v=spf1 ip4:[my server's external IP address] include:_spf.google.com ~all", removing the recursive lookup, and adding my server's IP so it can send me administrative notices.
Also today my ISP changed my IP address unexpectedly... all DNS updated.
To make a complete local backup of a remote WordPress install over SSH, you need to perform two distinct steps:
rsync).mysqldump piped through ssh).Here is the step-by-step guide.
Prerequisitesusername, host (IP or domain), and password (or SSH key) for the remote server./var/www/html or /home/user/public_html).If you don't know your database login details, run this command to read them from your remote wp-config.php file: ssh user@remote-server.com "cat /path/to/wordpress/wp-config.php" | grep 'DB_'
Note the DB_NAME, DB_USER, and DB_PASSWORD for Step 2.
N8n by default binds to localhost, and even binding it to listen on all interfaces, it still by default listens only for IPv6. You also may want to tell it to not use the Secure Cookie if you don't want to set up an SSL certificate or sign up for their cloud service. Make sure you only have it reachable on the local network if you do this, you don't want to open your instance to the entire world.
N8N_SECURE_COOKIE=false N8N_HOST=0.0.0.0 N8N_LISTEN_ADDRESS=0.0.0.0 npx n8n
Remember to open port 5678 on the machine's firewall if necessary.
With the browser plugin uBlock Origin, you can block shares from Instagram with the custom rule:
www.facebook.com##.html-div:has(a[href*="www.instagram.com"])
Note: Facebook changes their css often. This may not work for long.
Also, uBlock Origin is not always the fastest plugin, you may see the Instagram posts briefly on your screen before it removes them.
How to Block Instagram Shares from Facebook Using uBlock Origin: A Complete Guide
Social media platforms have become increasingly interconnected, with content from one platform frequently appearing on another. For Facebook users, this often means encountering Instagram shares in their news feed—sometimes from accounts they follow on both platforms, creating redundant content, and sometimes from accounts they don't follow on Instagram at all, courtesy of Facebook's algorithmic recommendations.
If you're looking to curate a cleaner Facebook experience by filtering out these Instagram cross-posts, browser extensions like uBlock Origin offer a powerful solution through custom…
I screenshare into a Mac for playing video on my TV, and had an intermittent problem where Firefox would not play video while screen sharing was connected, but then locked the screen as soon as I disconnected.
It turns out that if the screen is locked when you log in via screensharing, MacOS defaults to locking it again when you disconnected, and, being MacOS, the ability to turn this off has been removed from the UI.
Enter this in terminal to turn it off: sudo defaults write /Library/Preferences/com.apple.RemoteManagement RestoreMachineState -bool NO
I had a truly maddening problem where my /embed/ functionality was sometimes returning full pages to CURL commands and online services like redirect-checker.org, etc.
It turned out, it was Yoast's URL parameter stripping. I had failed to update Yoast's settings with some new parameters I was using, and what Yyoast never tells you is that when you're logged in, it lets everything work fine, and only strips parameters for non-logged in users. It just lets you proceed on your way thinking everything is working fine until you can't figure out why curl -I https://mysite.com/blah?param1¶m2 is getting a 301 redirect while https://mysite.com/blah?param1¶m2 is loading fine in your browser. This is especially fun on sites like mine where things like /embed/ and ?embed get written back and forth to each other internally.
I lost several hours to this.
Yoast's docs say there's a way of registering parameters but,…
Determining which script changed an element's attribute
So, I had an issue where quite a while ago I added some js code that would open a [code]details[/code] disclosure element if it contained a named anchor that was included in the page's URL. For instance if you loaded the URL [code]https://thisdomain.com/somepage.html#blahblahblah[/code], and the page had [code][/code] hidden inside a closed [code]details[/code] element, it would open that element by setting the attribute "open" on the details element, and scroll to reveal the anchor.
The problem was, I needed to make some changes to how that code functioned, and I couldn't find where I had added the script that did that.
Long story short: I temporarily added this script to the head of the page, and then reloaded it with an #anchor added to the URL, in this case [code]https://michaelkupietz.com/literally-hundreds-capsule-reviews/#puzzlehead[/code]:
[code] // Override the open property setter to catch when…
Here's the SQL query to get all post revisions, which I do prior to cleaning them out of the database, which seems to make it much faster:
SELECT p.*
FROM [posts table name] p
WHERE (p.post_type = 'post' OR p.post_type = 'page') -- Include posts/pages
AND (p.post_date BETWEEN '2020-01-01' AND '2029-07-01') -- Adjust date range
OR (p.post_type = 'revision' AND p.post_parent IN (
SELECT ID FROM [posts table name]
WHERE post_date BETWEEN '2024-01-01' AND '2024-07-01'
));
To get just a count of revisions, change SELECT p.* to SELECT count(*).
I removed a bunch of wildcard paths from rsnapshot.conf's exclude, and suddenly tonight my backup ran in a few minutes instead of taking over a day like it usually does.
Interesting, I've been looking off and on for at least the better part of a year for ways to lighten the load of rsnapshot's under-the-hood rsync backup commands, which reliably took up about half my CPU power almost continuously, and never found this tip before. You can see, plenty of wildcard paths removed, plus a few other things.
Here's a diff, rsnapshot.conf before changes (<) vs after (>):
< verbose 1
---
> verbose 4
120c120
< loglevel 2
---
> loglevel 4
143a144,146
> rsync_short_args -Wa
> #-W is transfer whole files without prescan, recommended for performance by https://serverfault.com/questions/639458/rsync-taking-100-of-cpu-and-hours-to-complete
> #NOTE: if you set the above short…
For confused first-time visitors and other people still acclimating, here is a description of these little tabs to the left, as well as some other features of the site.
Open "Expert Mode" CLI Navigation - this give you the option to switch your browser's display to an old-fashioned terminal mode where you may browse this site, view pages and images by typing text commands. Just like how we used to browse the web back in 1978!
Open Visual Settings - This gives you controls to customize the visual display of this website to your liking: turn up or down the brightness, contrast, color temperature, hue, saturation, dark mode, and earthquake. Settings are saved per browser tab, so they will be remembered for your whole visit.
Open My Eyes - Have you ever been engrossed in your work, when you suddenly realize someone is staring at your screen, watching everything you do over your shoulder? If not, this simulates the experience.
Open Help - This help popup, silly! You just clicked it! Do you not remember?
New - Draggable elements! Several elements on this website, including these tabs, this popup message, and the "Hire Mike" badge in the lower right, can be dragged around with your mouse, to avoid them blocking content. Positions are remembered per tab, so as you navigate around the site, they will stay in the same place for your whole visit.
Enjoy!
Are you sure you want to switch to viewing this website in the "expert mode" command-line interface?
This will switch to a terminal emulator, load this page, and allow you to browse this website and view its contents by typing text commands.
Plus there might be, y'know, some fun stuff hidden in there. Just for geeks.