Skip to content

Instantly share code, notes, and snippets.

View keirthomas's full-sized avatar

Mac Kung Fu keirthomas

View GitHub Profile
@keirthomas
keirthomas / com.mackungfu.kill-logging.plist
Created March 16, 2017 10:50
Launchd plist to start logkill.sh (which should be placed in /usr/local/bin/) on boot and every 30 minutes) – place this plist in /Library/LaunchDaemons/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mackungfu.kill-logging</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/logkill.sh</string>
</array>
@keirthomas
keirthomas / logkill.sh
Last active March 16, 2018 06:27
BASH script to kill most app/process logging in macOS Sierra – replace USERNAME with your username (use whois in terminal to discover this)
#!/bin/bash
for i in {1..70000};
do
NUM=`ps -o pid -p $i | grep $i `
if [ $NUM ];
then
echo " $i $NUM "
log config --process=$i --mode 'level:off'
fi