Last active
February 4, 2019 16:51
-
-
Save goranmoomin/948c5e448ea5f35ed68078a0c52e30f9 to your computer and use it in GitHub Desktop.
Bootstraping my laptop
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
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/cask-fonts" | |
tap "homebrew/core" | |
tap "homebrew/services" | |
brew "cmake" | |
brew "dnscrypt-proxy", restart_service: true | |
brew "fish" | |
brew "roswell" | |
brew "tmux" | |
cask "font-source-code-pro" | |
cask "font-source-han-sans" | |
cask "font-source-han-serif-el-m" | |
cask "font-source-han-serif-sb-h" | |
cask "keka" |
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
# # Setup local homebrew | |
# set -U fish_user_paths ~/.local/bin | |
brew bundle --file=(curl -s 'https://gist.githubusercontent.com/pcr910303/948c5e448ea5f35ed68078a0c52e30f9/raw/Brewfile' | psub) | |
# install megatools for file downloading | |
if not type -q megacopy | |
brew install megatools | |
end | |
# Ask for Mega username | |
read --prompt-str 'Enter Mega username: ' megauser | |
# Download Document folder and unzip zip files | |
mkdir -p ~/Documents | |
megacopy --username $megauser --local ~/Documents --remote /Root --download | |
find ~/Documents -depth -name '*.zip' -execdir /usr/bin/unzip -n {} \; -delete | |
# Erase Mega variables | |
set -e megauser |
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
# Ask for sudo beforehand | |
sudo -v | |
# Update sudo timestamp | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Set DNS Server | |
# Wi-Fi if notebook, Ethernet if anka | |
# networksetup -setdnsservers Ethernet 1.1.1.1 | |
# networksetup -setdnsservers Wi-Fi 1.1.1.1 | |
# Homebrew globally | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# sudo chmod -R +rw /usr/local | |
# # Homebrew locally | |
# mkdir -p ~/.local | |
# git clone https://github.com/Homebrew/brew.git ~/.local/Homebrew | |
# mkdir -p ~/.local/bin/ | |
# ln -s ~/.local/Homebrew/bin/brew ~/.local/bin/ | |
# Setup fish with global Homebrew | |
brew install fish | |
echo /usr/local/bin/fish | sudo tee -a /etc/shells | |
chsh -s /usr/local/bin/fish | |
# Pass init.fish to fish shell | |
exec fish | |
source (curl -s 'https://gist.githubusercontent.com/pcr910303/948c5e448ea5f35ed68078a0c52e30f9/raw/init.fish' | psub) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment