Skip to content

Instantly share code, notes, and snippets.

View adriannier's full-sized avatar

Adrian Nier adriannier

View GitHub Profile
var testStrings = ['']
// Valid email addresses
testStrings.push('[email protected]')
testStrings.push('[email protected]')
testStrings.push('[email protected]')
testStrings.push('[email protected]')
testStrings.push('[email protected]')
testStrings.push('[email protected] (may go to [email protected] inbox depending on mail server)')
testStrings.push('[email protected] (one-letter local-part)')
@adriannier
adriannier / keybase.md
Created July 23, 2022 09:18
Keybase proof

Keybase proof

I hereby claim:

  • I am adriannier on github.
  • I am adriannier (https://keybase.io/adriannier) on keybase.
  • I have a public key ASCN2leIH7a87Vz08kcgklfoQyGL-sCSt1kVxs_N6Z-HJAo

To claim this, I am signing this object:

Dump schema

sqlite3 Accounts4.sqlite .schema

Dump data

sqlite3 Accounts4.sqlite .dump
/*
# CRLF is converted to composite Unicode character
## Description
FileMaker Pro combines the character sequence CRLF into a
composite character with the Unicode decimal code point
1000013 which is in the private use area and therefore
non-standard. This behavior results in the string in
question being shorter than expected.

Download macOS installer application

Greg Neagle created a Python script titled installinstallmacos.py that downloads macOS installer applications from Apple’s servers. There is a fork by Graham Pugh that adds the ability to search for a matching release using a version string like 10.15.7: https://github.com/grahampugh/macadmin-scripts/blob/main/installinstallmacos.py

The following command will download the necessary package from Apple’s servers and install the macOS Installer application onto a disk

osascript -e 'set safariCacheFolder to (((path to library folder from user domain) as text) & "Caches:com.apple.Safari")' -e 'try' -e 'set safariCacheFolderInfo to info for alias safariCacheFolder' -e 'on error' -e 'set safariCacheFolderInfo to false' -e 'end try' -e 'if safariCacheFolderInfo is not false then' -e 'do shell script "touch -f " & quoted form of (POSIX path of safariCacheFolder)' -e 'return (size of safariCacheFolderInfo) / (1000 ^ 2)' -e 'end if'
(*
Terminates the DeepL application and all associated background
processes until it is explicitly launched again
*)
tell application id "com.linguee.DeepLCopyTranslator" to quit
tell application id "com.linguee.DeepLLauncher" to quit
tell application id "com.linguee.DeepLStatusBar" to quit
function git() {
if [[ $@ == "init" ]]; then
# Create new repositories with a **main** branch by default
command git init && git checkout -b main
else
# Perform default git command
command git "$@"
fi
@adriannier
adriannier / count_filemaker_variables.applescript
Created January 10, 2018 23:37
Processes FileMaker scripts or script steps on the clipboard and displays how many times each variable is used.
(*
AppleScript: Count FileMaker Variables
Processes FileMaker scripts or script steps on the clipboard
and displays how many times each variable is used
-----------------------------------------------------------------------------------
Copyright (c) 2018 by Adrian Nier (http://adriannier.de)