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
#How do I loop through only directories in bash? | |
for d in */ ; do | |
echo "$d" | |
done | |
# copy | |
cp -source -destination | |
# create file | |
touch .bash_profile |
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
# additional dev configs to set | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
defaults write com.apple.finder ShowPathbar -bool true | |
defaults write com.apple.finder ShowStatusBar -bool true | |
defaults write NSGlobalDomain KeyRepeat -int 0.02 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 12 | |
chflags nohidden ~/Library |
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
# install | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install wget | |
# Homebrew installs packages to their own directory and then symlinks their files into /usr/local. | |
$ cd /usr/local | |
$ find Cellar | |
Cellar/wget/1.16.1 | |
Cellar/wget/1.16.1/bin/wget | |
Cellar/wget/1.16.1/share/man/man1/wget.1 |
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
# find all files linked to application | |
mdfind -name "bitbar" | |
# remove fully an application | |
sudo rm -rif ~/Directory/Component/Removeme.pane | |
sudo rm -rif /TheLibrary/LaunchDaemons/sketchyd | |
sudo rm -rif /usr/sbin/crudrunner | |
sudo rm -rif ~/Download/sketchydaemon-installer.tgz | |
mdfind -name [application name] |
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
# IF VIA SSH | |
# *********** | |
# If use of ssh key | |
# ssh-keygen -t rsa -C "[email protected]" | |
# Copy ssh key to github.com | |
# subl ~/.ssh/id_rsa.pub | |
# Test connection | |
# ssh -T [email protected] |
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
# Complete macOS Setup | |
# From clean install to fully configured. | |
# Step 1: Init Environment | |
#Temporarily Disable sudo Password Timeout | |
#The sudo password timeout is re-enabled at the end of this script. ##+BEGIN_SRC sh sudo tee /etc/sudoers.d/timeout > /dev/null <<-EOF Defaults timestamp_timeout=-1 EOF ##+END_SRC | |
##+BEGIN_SRC sh sudo tee /etc/sudoers.d/installer > /dev/null <<-EOF %admin ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/installer EOF ##+END_SRC |
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
# Shutdown Your Mac, With or Without a Delay | |
sudo shutdown -h now # shutdown | |
sudo shutdown -r now # restart | |
sudo shutdown -r +60 # 60 min | |
# uptime of mac | |
uptime | |
# Install OS X Software Updates | |
sudo softwareupdate -l |
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
# Remove Duplicate “Open With…” Entries | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user | |
# Open Files In Any Application | |
open -a /Applications/AppName.app /path/to/file.txt | |
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
############################################################################### | |
# Install Applications # | |
############################################################################### | |
# Install Homebrew | |
echo "Installing Homebrew" | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
clear |
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
#Installing Nodejs | |
echo "Installing Nodejs" | |
nvm install node | |
nvm use node | |
npm install -g coffee-script | |
npm install -g grunt-cli | |
npm install -g gulp | |
npm install -g bower |
OlderNewer