Posts tagged with: dev
← Back to all tagsJust making some small Wikipedia edits today.
(Not really, it’s just a browser preview 😂)
I’ve been using Insomnia for testing API calls for a while and have been mostly pleased with it. Today I noticed I was several versions behind and the app no longer seemed to have a Check for Updates option. I went to their site and found new versions.
I made the mistake of just installing the latest version, thinking the upgrade would go smoothly. The new version opened without any of my API request collections. It looked like it found some older collections, but I had to login in order to migrate them. That was frustrating, especially since I’m not using any of their cloud or paid features, but sure, I’ll sign up for an account since you’re holding it hostage.
After entering my email, it told me to enter the verification code they sent me. No email came from them, though. I tried to re-send it and still no dice after waiting for half an hour. I get that this is a nice way to verify the authenticity of an email address, but it’s very frustrating that it prevents me from even using the app. They should at least let people sign in and then prompt to verify the email address as a separate step.
At that point I did what I should have done first 🤣 and searched for issues with upgrading. I was very much not alone. From that thread, I found that several people had downgraded to version 2023.5.8
, the last version before version 8, and their collections were restored. I did that and voila, my collections are back! I immediately turned off the preference to automatically download software updates.
I should probably switch to Postman, but also found Hoppscotch.io and httpie recommended as open source options, so I’ll check into those too.
I prefer to use curly quotes and apostrophes in my posts, but unfortunately they are tricky to use on Windows. You have to type an incantation like ALT + 0147
to get “ and ALT + 0148
to get ” — and only on the keyboard number pad, not the numbers in the top row.
Alas, I have no number pad currently.
In recent years I’ve been using the Graphemica site since I have this search in my browser autocomplete: https://graphemica.com/search?q=quote. It’s a good reference site, but it is still a bit tedious to copy the characters.
Stack Overflow came to the rescue with a one-liner browser bookmarklet that lets you put text in your clipboard using the Clipboard API.
So I set up these four bookmarklets. You can create a new bookmark in your browser, enter a title for it, then copy the full bookmarklet line into the URL field. Rinse and repeat. Each bookmarklet URL should start with javascript:
Left Quote:
javascript: navigator.clipboard.writeText('“');
Right Quote:
javascript: navigator.clipboard.writeText('”');
Right Single Quote / Apostrophe:
javascript: navigator.clipboard.writeText('’');
Left Single Quote:
javascript: navigator.clipboard.writeText('‘');
I initially had the null;
at the end like the Stack Overflow answer. That worked in Chrome but I found it didn’t work in Firefox. When I removed it, it worked in both.
I have a work project that requires adding DKIM and DMARC. I was familiar with both, but hadn’t actually set them up myself yet. Thankfully, PHPMailer seems to have pretty good DKIM support built-in, as well as an example script to set up the public/private key pair.
I made a couple small changes in that example script. First I set up a full path to where I wanted the PEM files to be saved.
define('KEYFILE_DIR', '/replace/with/full/path/'); $privatekeyfile = KEYFILE_DIR . $selector . '_dkim_private.pem'; $publickeyfile = KEYFILE_DIR . $selector . '_dkim_public.pem';
I wanted the private key to be encrypted with a passphrase, so I changed the export-to-file line to this:
openssl_pkey_export_to_file($pk, $privatekeyfile, $passphrase);
After setting the $domain
and $selector
variables, running the script created the public and private key files and displayed the information needed to set up the DNS record. The script chunked the public key into 255-character segments because some DNS systems don’t like longer text. In our experience, though, we didn’t need the chunking, so we used the public key with the PEM wrapper removed.
Adding a few lines of DKIM configuration (from another of their example scripts) was all I needed to include DKIM Signature header with each message. I tested with a message sent to a Gmail address and it showed it was signed by the domain. Viewing the full email headers, I could also see dkim=pass
in a couple places. I also used the Google MessageHeader tool to paste in the full email headers and it confirmed DKIM passed.
Bookmarked: Working around SPF problems delivering to Gmail
Bookmarked: Official Single-Sign-On for Discourse (sso)
Bookmarked: CSS Bed
This is a collection of classless css themes to use as starting points in web development.
Bookmarked: fmPDA
“fmPDA is a set of PHP classes for FileMaker's Data and Admin API. The special sauce, the fmPDA class: a replacement for FileMaker's API For PHP 'FileMaker' class, using the Data API. fmPDA provides method & data structure compatibility with FileMaker's API For PHP.”