Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added mac-clean sublime provisioning mac provisioning compiled npmrc
- Loading branch information
Showing
14 changed files
with
205 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ ssh/* | |
cron/logs | ||
bash/secrets.sh | ||
templates/terminal/color-schemes | ||
templates/licenses |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/bin/bash | ||
|
||
# cleanup (){ | ||
# # restore sudoers original state | ||
# sudo sed -ibkp '/Defaults timestamp_timeout=-1/d' /etc/sudoers | ||
# } | ||
|
||
# echo "==> Making sudo ask for passwords just once" | ||
# echo "Please, enter your local account's password." | ||
# echo "Defaults timestamp_timeout=-1" | sudo tee -a /etc/sudoers || exit 2 | ||
|
||
# ------------------------------------------------------------- | ||
# Cleaning Log files | ||
echo "==> cleaning log files" | ||
sudo rm -Rf $HOME/Library/Logs/* | ||
echo "$HOME/Library/Logs" | ||
sudo rm -Rf /Library/Logs/* | ||
echo "/Library/Logs" | ||
|
||
# Cleaning Cache files | ||
# echo "==> cleaning cache files" | ||
# sudo rm -Rf $HOME/Library/Caches/* | ||
# echo "$HOME/Library/Caches" | ||
# sudo rm -Rf /Library/Caches/* | ||
# echo "/Library/Caches" | ||
|
||
# ------------------------------------------------------------- | ||
# # Get rid of localizations: APPS/Contents/Resources/*.lproj | ||
# # except English.lproj, Base.lproj, en.lproj | ||
|
||
echo "==> cleaning Locale files" | ||
macCleanList=`mktemp -t macClean` | ||
sudo find /Users /Applications /opt /Library /System -iregex '.*\.lproj' | \ | ||
perl -wnE'say for /.+(?<!English)(?<!en)(?<!en_US)(?<!Base)\.lproj/g' > $macCleanList | ||
while read in; do sudo rm -Rf "$in"; done < $macCleanList | ||
|
||
# ------------------------------------------------------------- | ||
# | ||
# Chrome | ||
# ✔ remove old versions extension | ||
# ✔ clean up old versions of chrome | ||
# - clean up old versions of chrome canary | ||
# - save Local Extension Settings | ||
|
||
# Clean Chrome Extensions folder, keeping olny the most recent version | ||
echo "==> cleaning old chrome extensions" | ||
EXTS_DIR="$HOME/Library/Application Support/Google/Chrome/Default/Extensions" | ||
for EDIR in `ls -1 "$EXTS_DIR"`; do | ||
num_ext=`ls -1 "$EXTS_DIR/$EDIR" | wc -l` | ||
if [ $num_ext -gt 1 ]; then | ||
ls -1tUr "$EXTS_DIR/$EDIR" | \ | ||
head -n $(expr $num_ext - 1) | \ | ||
awk -v path="$EXTS_DIR/$EDIR/" '{ print "\"" path $0 "\"" }' | \ | ||
xargs rm -Rf | ||
fi | ||
done | ||
|
||
# Clean up old versions of chrome | ||
chrome=`osascript -e 'POSIX path of (path to application "Chrome")'` | ||
echo "==> cleaning old versions of Google Chrome" | ||
echo $chrome | ||
chrome_versions_count=`ls "$chrome/Contents/Versions" | wc -l` | ||
if [ $chrome_versions_count -gt 1 ]; then | ||
echo "more than one version, should be cleaned" | ||
else | ||
echo "just one verison" | ||
fi | ||
|
||
# ------------------------------------------------------------- | ||
# Listing Launch Agents | ||
echo "==> LaunchAgents" | ||
ls -1 $HOME/Library/LaunchAgents | ||
ls -1 /Library/LaunchAgents | ||
ls -1 /Library/LaunchDaemons | ||
|
||
# ------------------------------------------------------------- | ||
|
||
|
||
# Find Stuff | ||
# sudo find ~ /Library /System/Library -iregex '.*iterm.*' | ||
# sudo find /Users /Library /Applications /System /opt /bin /sbin /private -iregex '.*iterm.*' | ||
|
||
# Get rid of all recent files | ||
# sudo find ~ /Library -iregex '.*LSSharedFileList.*' | ||
|
||
# $HOME/Library/Messages | ||
# $HOME/Library/Saved Application State | ||
# $HOME/Library/Application Support/CrashReporter | ||
|
||
|
||
# Delete System fonts I dont use /Library/Fonts | ||
# Delete System dictionaries I dont use /Library/Dictionaries | ||
# Delete DesktopPicktures | ||
# Delete Screen Savers | ||
|
||
# BACKUP | ||
# $HOME/Library/Keychains | ||
|
||
# cleanup |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
email = allen.bargi@gmail.com | ||
username = aziz | ||
init.author.email = allen.bargi@gmail.com | ||
init.author.name = Allen Bargi | ||
init.author.url = https://github.com/aziz | ||
email = ${email} | ||
username = ${npm_username} | ||
init.author.email = ${email} | ||
init.author.name = ${name} | ||
init.author.url = https://github.com/${gh_username} | ||
loglevel = warn | ||
viewer = browser |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
if pkgutil --pkg-info=com.apple.pkg.CLTools_Executables > /dev/null 2>&1; then | ||
echo "==> Mac OSX Command-Line Tools are installed." | ||
else | ||
echo "==> Installing Command-Line Tools" | ||
xcode-select --install | ||
fi | ||
|
||
sudo defaults write /Library/Preferences/org.openbsd.openssh KeychainIntegration -bool NO | ||
echo "==> Config: Disabled KeychainIntegration for SSH" | ||
|
||
sudo defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | ||
echo "==> Config: Save to disk (not to iCloud) by default" | ||
|
||
sudo defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true | ||
echo "==> Config: Automatically quit printer app once the print jobs complete" | ||
|
||
sudo defaults write com.apple.finder CreateDesktop -bool false | ||
echo "==> Config: Hides Desktop" | ||
|
||
sudo defaults write com.apple.Finder FXPreferredViewStyle Nlsv | ||
echo "==> Config: Always open everything in Finder's list view" | ||
|
||
sudo defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | ||
echo "==> Config: Expand save panel by default" | ||
|
||
sudo killall Finder | ||
sudo 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
ST_DIR="$HOME/Library/Application Support/Sublime Text 3" | ||
|
||
# install license | ||
mkdir -p "$ST_DIR/Local" | ||
cp "$HOME/.templates/licenses/License.sublime_license" "$ST_DIR/Local/License.sublime_license" | ||
|
||
# hides minimap | ||
echo '{"settings":{"new_window_settings":{"show_minimap": false}}}' > "$ST_DIR/Local/Session.sublime_session" | ||
|
||
# install package control | ||
mkdir -p "$ST_DIR/Installed Packages" | ||
curl "https://sublime.wbond.net/Package%20Control.sublime-package" -o "$ST_DIR/Installed Packages/Package Control.sublime-package" | ||
|
||
# install personal user repo | ||
rm -Rf "$ST_DIR/Packages/User" | ||
mkdir -p "$ST_DIR/Packages/User" | ||
git clone git@github.com:aziz/sublimeText3-Userfiles.git "$ST_DIR/Packages/User" | ||
|
||
# copy theme default | ||
cp -r "$ST_DIR/Packages/User/Theme/Theme - Default" "$ST_DIR/Packages" | ||
|
||
# install plugins from git | ||
cd "$ST_DIR/Packages" && rm -Rf PlainTasks && git clone git@github.com:aziz/PlainTasks.git | ||
cd "$ST_DIR/Packages" && rm -Rf PlainNotes && git clone git@github.com:aziz/PlainNotes.git | ||
cd "$ST_DIR/Packages" && rm -Rf FileBrowser && git clone git@github.com:aziz/SublimeFileBrowser.git FileBrowser |
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
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
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