Skip to content

Instantly share code, notes, and snippets.

april /
Last active March 15, 2024 00:56
find all apps using Electron and their versions, on macOS systems
#!/usr/bin/env zsh
# patched versions for CVE-2023-4863: 22.3.24, 24.8.3, 25.8.1, 26.2.1
mdfind "kind:app" 2>/dev/null | sort -u | while read app;
filename="$app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
if [[ -f $filename ]]; then
echo "App Name: $(basename ${app})"
electronVersion=$(strings "$filename" | grep "Chrome/" | grep -i Electron | grep -v '%s' | sort -u | cut -f 3 -d '/')
llimllib /
Last active April 11, 2024 21:07
The script I use to set up a new mac just the way I like it
#!/usr/bin/env bash
# many settings from
# many settings from
# instructions on finding the default you've changed:
# previous install notes at:
# this script's URL is:
RobertAKARobin /
Last active January 5, 2024 05:41
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

* DataGrab File Grid fieldtype class
* @package DataGrab
* @author Andrew Weaver <>
* @copyright Copyright (c) Andrew Weaver
class Datagrab_file_grid extends Datagrab_fieldtype
thealanberman /
Last active August 8, 2023 16:25
My Mac Recommendations

macOS Recommendations

General Utilities

  • Rectangle — a free option for window snapping/arrangement stuff.
  • AltTab — an improved window switcher with some decent customizability
  • Shifty — a macOS "night shift" slider
  • Raycast — Spotlight replacement, somewhat like Alfred, but free and more customizable
  • Better Touch Tool — not free, but worth every penny. Pretty awesome window snapping/arrangement capabilties (like Rectangle but MOAR), and lets you create shortcuts for keyboard/mouse/touchpad/touchbar/etc.
  • Keka — compression utility that handles 7zip, rar, and some other archive formats that don't work natively in macOS.
  • NameChanger — batch file-renamer with a handy intuitive UI
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/system [NC]
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{DOCUMENT_ROOT}/static/default_site/static%{REQUEST_URI}/index\.php -f
RewriteRule ^ /static/default_site/static%{REQUEST_URI}/index\.php [L,QSA]
sveggiani /
Last active July 15, 2023 21:52
[Configure XDebug, Visual Studio Code for a Vagrant VM] #debug #vm #vscode #masscode

Configure XDebug, Visual Studio Code for a Vagrant VM

1. Assumptions

  • Project (Drupal) is served on /var/www/html in the Vagrant box
  • Local project files location: c:\Users\username\Work\projects\my-project\repo\html
  • Guest machine IP is (if this doesn't work, run route -nee in the VM and look for the gateway address)

2. Configuration

leevigraham / Generate ssl certificates with Subject Alt Names on
Last active June 11, 2024 09:48
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.

Save ssl.conf to your my_project directory.

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

pedro-santiago /
Last active November 18, 2020 22:20 — forked from gghughunishvili/
Upgrade MAMP 4 to Mysql 5.7.18 (on Sierra tested)
tar xfvz mysql-5.7.18-macos10.12-x86_64.tar.gz
echo "Stopping MAMP"
sudo /Applications/MAMP/bin/
sudo killall httpd mysqld
echo "Copy Bin"