Skip to content

Instantly share code, notes, and snippets.

folders=`mdfind -onlyin ~ 'kMDItemContentType==public.folder && kMDItemDisplayName == Dropbox'`
for folder in $folders
do
if [ -e $folder/$'Icon\r' ]
then
echo $folder
fi
In postinstall:
echo "passed in variables:"
echo "0:$0 1:$1 2:$2 3:$3 4:$4 5:$5 6:$6 7:$7"
Output in /var/log/install.log after startosinstall runs:
0:/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/81112756-C982-46F8-A663-A67CB0546A6B.activeSandbox/Scripts/com.twocanoes.winclone_1548703538.7G2Wab/postinstall 1:/Library/Application Support/com.apple.installer/UnwrappedInstallers/40c094454d46bfd5d00fa1c13e38401aab6addfe/Windows%2010.pkg 2:/private/tmp 3:/ 4:/ 5: 6: 7:
Note that $1 ends with Windows%2010.pkg
log show --style syslog --predicate 'process contains[cd] "Winclone"' --info --last 2d
@tperfitt
tperfitt / crlf.screenrc
Created February 26, 2019 02:46 — forked from cabo/crlf.screenrc
Make GNU screen convert return key (CR) into CR-LF
# put this in your ~/.screenrc to make
# ^A D (uppercase) switch on, and
# ^A U (uppercase) switch off, converting
# CR (return keys) input into CRLF
bind D bindkey "\015" stuff "\015\012"
bind U bindkey "\015" stuff "\015"
log show --style syslog --predicate 'process contains "MDS"' --info --debug --last 30m
+-o ARPT@0 <class IOPCIDevice, id 0x10000038f, registered, matched, active, busy 0 (1527 ms), retain 15>
| {
| "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| "built-in" = <00>
| "wlan.tx.ring.size" = 512
| "bcom.roam.profiles" = <0c00f6ffb5ff0200b80bb4000200b0041400bfff32001000b5ff80ff02005a001e0001001e000c00bfff3200000000000000000000000000000000000000000000001000b5ff80ff0$
| "wlan.awdl.params" = <0000000000000000>
| "wlan.tethering.enabled" = <01000000>
| "IODeviceMemory" = (({"address"=2168455168,"length"=32768}),({"address"=2164260864,"length"=4194304}))
| "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/RP01@1c0000/ARPT@0"
+-o ARPT@0 <class IOPCIDevice, id 0x10000038f, registered, matched, active, busy 0 (1527 ms), retain 15>
| {
| "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| "built-in" = <00>
| "wlan.tx.ring.size" = 512
| "bcom.roam.profiles" = <0c00f6ffb5ff0200b80bb4000200b0041400bfff32001000b5ff80ff02005a001e0001001e000c00bfff3200000000000000000000000000000000000000000000001000b5ff80ff0$
| "wlan.awdl.params" = <0000000000000000>
| "wlan.tethering.enabled" = <01000000>
| "IODeviceMemory" = (({"address"=2168455168,"length"=32768}),({"address"=2164260864,"length"=4194304}))
| "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/RP01@1c0000/ARPT@0"
This file has been truncated, but you can view the full file.
Accessibility:
Accessibility Information:
Cursor Magnification: Off
Display: Black on White
Flash Screen: Off
Mouse Keys: Off
Slow Keys: Off
Sticky Keys: Off
#!/bin/sh
write_prefs(){
local folder=$1
if [ -z "${folder}" ]; then
echo "you must specify a path to write prefs"
exit -1
fi
darwin_major_version="$(uname -r | cut -d '.' -f 1)" # 17 = 10.13, 18 = 10.14, 19 = 10.15, 20 = 11.0, etc.