Should be considered out-of-date but still relevant overall.
- Assumptions
- Basic Configuration
- Mac OS Configuration
- Package Managers
- Local Databases
- Python Specific Environment
- Docker
- Other Helpful Tools
- Out of Date
- Mac OS X 10.10.4+
- Dropbox
- Sublime Text 3
- You're logged in as an administrative user of the computer.
- You want Python 2.7.x (2.7 is end of life, upgrade to 3!)
- You have a VPN already
- Github for Mac [ Source ]
- Unhide Library Folder
- Open Finder.
- Press
shift-command-H
and thencommand-J
, which will bring up a window that configures Finder view options. - Check the “Show Library Folder” and close the window.
- Bash Profile Setup
vim ~/.bash_profile
# Finder: show hidden files
defaults write com.apple.finder AppleShowAllFiles TRUE
# Always use colour output for ls.
[[ "$OSTYPE" =~ ^darwin ]] && alias ls='command ls -G' || alias ls='command ls --color';
######ALIASES###############
alias sublime='open -a "Sublime Text 2"'
alias reload='source ~/.bash_profile'
alias edit_profile='vim ~/.bash_profile'
######EXPORT#############
export EDITOR=sublime
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
# Ignore duplicate commands in the history
export HISTCONTROL=ignoredups
# Increase the maximum number of lines contained in the history file
# (default is 500)
export HISTFILESIZE=10000
# Increase the maximum number of commands to remember
# (default is 500)
export HISTSIZE=10000
# Make new shells get the history lines from all previous
# shells instead of the default "last window closed" history
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# Append to the Bash history file, rather than overwriting it
shopt -s histappend;
export WORKON_HOME=~/Envs
export PROJECT_HOME=~/Envs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTULENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
* `source ~/.bash_profile`
- Get the XCode pieces you need
xcode-select --install
- Will prompt for full version of Xcode or just command line tools
- Change background of login screen Lifehacker article If you're running Yosemite, all you need to do is save your desired image as: /Library/Caches/com.apple.desktop.admin.png.
- Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- PIP
sudo easy_install pip
- Sublime Text 3 Package Control
View > Show Console
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
- Markdown Preview
- Color Highlighter
- PostgreSQL Syntax Highlighting
- Bracket Highlighter
- Bootstrap 4 Snippets
- Gitgutter
- In Preference > Settings > user file add
{
"auto_complete_triggers":
[
{
"characters": "b4",
"selector": "text.html"
}
],
"font_size": 15,
"ignored_packages":
[
"Vintage"
]
}
Sublime Text 3 Only
mysql -v
brew install mysql
mysql -v
mysql -uroot
# mysql-5.7.19.sierra.bottle.tar.gz as of this writing
#We've installed your MySQL database without a root password. To secure it run:
# mysql_secure_installation
#MySQL is configured to only allow connections from localhost by default
#To connect run:
# mysql -uroot
#To have launchd start mysql now and restart at login:
# brew services start mysql
#Or, if you don't want/need a background service you can just run:
# mysql.server start
Asssumes the variables for virtualenv listed in the ~/.bash_profile above. Uses virtualenvwrapper to - you guessed it - wrap virtualenv.
pip install virtualenv
pip install --ignore-installed six #handles six upgrade error
pip install virtualenvwrapper
export WORKON_HOME=~/Envs
source /usr/local/bin/virtualenvwrapper.sh
- Close Terminal and Re-open Terminal.
cd
to your directorymkvirtualenv venv
workon venv
- pandas
- psycopg2
- See Also Awesome-Python
- Flask
pip install Flask
- Flask Homepage
- Flask-bootstrap
pip install flask-bootstrap
- Flask-Bootstrap Homepage
- cookiecutter-flask (Comes with FontAwesome 4)
pip install cookiecutter-flask
cookiecutter https://github.com/sloria/cookiecutter-flask.git
- cookiecutter-flask homepage
pip install django
- Sublime Plugins
- Django Plugins
- Official First Django App Tutorial
- Download stable package from https://docs.docker.com/docker-for-mac/install/ and install.
- Toggl
- Mozilla Firefox
- Set Default Search to bing.com
- 1Password Extenions
- EFF Plugin Home - HTTPS Everywhere, etc.
- Wayback Machine Extension
- Find other Firefox Addons
- Slack
- Download from App Store with Licenses
- 1Password
- Moom
- Paste or non-Mac Store
- Navicat
- Start the Xcode download/updates first through the App Store. This takes awhile. (you can download only the part you need with the CLI command above.)
Sublime Packages - Optional/Don't Use in 2021
-
RegReplace
-
mergetool/difftool
- Kaleidoscope
- Other options:
-
You may need to
brew install gnupg gnupg2
first so the gpg key can be installed. -
To solve the errors from this:
sudo chown -R $(whoami) /usr/local/lib
brew link libgpg-error
brew link libassuan
brew link libgcrypt
brew link libksba
brew link libusb
brew link libusb-compat
brew link pth
-
brew doctor
can be helpful as well. -
Install
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
source /Users/{username}/.rvm/scripts/rvm
(replace {username})rvm install 2.2.4
(or latest stable release version on this page Ruby)rvm use 2.2.4
- You may also want
ruby -v
orwhich ruby
.
-
Link to RVM for niceness sake, but avoid reading their docs at all costs. They are horrible.
- Postgresql =
gem install pg
- Cheatset =
gem install cheatset
Make cheat sheets for Dash.
Here are commands I've used in getting started on a rails project setup. Don't run unless you understand them.
gem install bundler
bundle install
gem install rails
- Official Getting Started Guide
bin/setup
bundle exec rake db:create db:schema:load