This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
{ set +x; } 2>/dev/null | |
lsappinfo info -only name `lsappinfo front` | awk -F'"' '{print $4}' | |
lsappinfo info -only pid `lsappinfo front` | awk -F'"=' '{print $2}' | |
lsappinfo info -only bundlepath `lsappinfo front` | awk -F'"' '{print $4}' | |
lsappinfo info -only bundleID `lsappinfo front` | awk -F'"' '{print $4}' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PORT=8013 | |
lsof -nP -iTCP:$PORT | grep LISTEN;: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
path=/Applications/Automator.app | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>$path</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"; killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# I have managed to map out some undesirable daemons and agents. Most of these | |
# can be disabled without too much consequence. | |
## Daemons | |
# com.apple.analyticsd - Anonymized application analytics daemon | |
# com.apple.appleseed.fbahelperd - Feedback Assistant Helper Daemon | |
# com.apple.awacsd - Apple Wide Area Connectivity Service Daemon | |
# com.apple.backupd - Apple TimeMachine service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
{ set +x; } 2>/dev/null | |
IFS=$'\n' | |
set "$@" $(find ~ -name ".*" ! -name ".CFUserTextEncoding" ! -type l -mindepth 1 -maxdepth 1) # dotfiles | |
set "$@" $(find ~ -name "Google *" -mindepth 1 -maxdepth 1) # Google Drive | |
set "$@" ~/git # store on github/etc :) | |
set "$@" ~/node_modules | |
set "$@" ~/Applications # install apps with brew cask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7-alpine | |
RUN apk add --no-cache libcurl | |
ENV PYCURL_SSL_LIBRARY=openssl | |
RUN apk add --no-cache --virtual .build-deps build-base curl-dev \ | |
&& pip install pycurl \ | |
&& apk del --no-cache --purge .build-deps \ | |
&& rm -rf /var/cache/apk/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
s = 'word1 :blush: word2' | |
print(re.sub(':[^:]+:', '', s).strip()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# speed up Time Machine backup, Mac App Store install, etc | |
sudo /usr/sbin/sysctl debug.lowpri_throttle_enabled=0 | |
# restore defaults | |
sudo /usr/sbin/sysctl debug.lowpri_throttle_enabled=1 | |
# check: | |
sysctl debug.lowpri_throttle_enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Disable Face Detect in Photos app | |
defaults write com.apple.iPhoto PKFaceDetectionEnabled 0 | |
defaults write com.apple.gamed Disabled -bool true | |
defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES # log out, log in | |
NewerOlder