A curated list of arrrrrrrrr!
#!/bin/sh | |
basename=`basename $0` | |
if [ -z "$*" ]; then | |
echo "usage: ${basename} <dot> [ -o | -r | <file> | - ]" | |
echo "" | |
echo "options:" | |
echo " -o open dot in window with keyboard focus" | |
echo " -r read contents of dot" |
BOOL canRecordScreen = YES; | |
if (@available(macOS 10.15, *)) { | |
canRecordScreen = NO; | |
NSRunningApplication *runningApplication = NSRunningApplication.currentApplication; | |
NSNumber *ourProcessIdentifier = [NSNumber numberWithInteger:runningApplication.processIdentifier]; | |
CFArrayRef windowList = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID); | |
NSUInteger numberOfWindows = CFArrayGetCount(windowList); | |
for (int index = 0; index < numberOfWindows; index++) { | |
// get information for each window |
There are a couple of problems with the new formatting bar: | |
1) The icon to turn it on/off doesn't make sense. It's a toolbar, and the "Aa" doesn't get that concept across. It's in a strange place, next to "@" and ":-)", icons that cause an element to come up over the text field without changing it. A lot of smart folks aren't figuring this out (and let's face it, no one reads the fricken' manual.) Don't believe me, check out the replies to this tweet: | |
https://twitter.com/chockenberry/status/1196992017143779328 | |
2) Once you have the epiphany to turn it off, it doesn't turn off the functionality. I've been using Markdown since it was just a glint in John Gruber's eye, and it's actually easier for me to _read_ text *like this* even when it contains `code`. | |
If I opt out of the formatting bar, it feels like I should be opting out the fancy completion stuff, too. |
// | |
// Debug.swift | |
// | |
// Created by Craig Hockenberry on 3/15/17. | |
// Updated by Craig Hockenberry on 2/20/24. | |
// Usage: | |
// | |
// SplineReticulationManager.swift: | |
// |
#!/bin/bash | |
xdotool mousemove 100 100 | |
xdotool click 1 | |
for i in `rand -M 3 -N 1000`; do | |
echo -n "Play $i " | |
case "$i" in | |
"0") |
Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.
There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...
Here we install python3-pip and qrencode so we can generate our secret, I
I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:
- I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
- I installed GPGTools as recommended. However, as I'll note later, it seems that
gpg-agent
only automatically starts when gpg is used; for ssh, you'll need to ensure it's running. - Before generating your keys, decide what key size you want to use. If you run the
list
command insidegpg --edit-card
, look for theKey attributes
line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
Key attributes ...: rsa2048 rsa2048 rsa2048
Download the latest ugw3
package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb
.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
1. DO NOT attempt to remove any Apple-supplied system Python which are in /System/Library
and /usr/bin
.
2. Multiple Python versions can coexist pacifically on macOS. So, uninstalling Python is purely optional.
To remove a different version, change 3.7
to the Python version you want to remove.
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7
sudo rm -rf "/Applications/Python 3.7"
sudo find /usr/local/bin -lname '../../../Library/Frameworks/Python.framework/Versions/3.7/*' -delete