-
Install tree
$ brew install tree -
Install node
$ brew install node -
Install yarn
$ brew install yarn -
Install cask
$ brew tap caskroom/cask -
Install gulp globally
$ sudo npm install gulp-cli -g -
Add prettier globally
$ yarn global add prettier -
Install iTerm2
- Settings (Preferences)
$ sudo easy_install pip
- Import cobalt 2 and select it
- Changes text to powerfont and cursor to vertical line
- Set window transparency
- SidebarEnhancements
- Advanced New File
- Markdown Extended
- Markdown Preview
- You need to set the default browser to Chrome (or it will keep opening in Safari)
- In user settings of Markdown Preview enter this code:
- You also want to install MarkdownEditing
- In order to see the default color setting, quit Sublime Text and reopen
- Than you can choose different themes with
cmd + shift + p"MarkdownEditing: Change color scheme..."
{
/*
Sets the default opener for HTML files
default - Use the system default HTML viewer
other - Set a full path to any executable. ex: /Applications/Google Chrome Canary.app or /Applications/Firefox.app
*/
"browser": "/Applications/Google Chrome.app"
}
- Oceanic Next Color Scheme
- Sass
- Seti_UI
- HTML-CSS-Javasript Prettify
- LiveReload
- To use:
- cmd + shift + p
- live reload: enable/disable plugin
- enable simple reload
- Now when you want to view markdown preview with:
- cmd + shift + p
- preview in browser > markdown
- You will see your markdown formatted nicely in browser
- And changed you make to markdown file will automatically update in browser... in real time!
- To use:
- Emmet
- JavaScript Next Snippets
- Origami
- OpenInBrowser
- jsPrettier
- You also already installed this globally
- To get it working in Sublime Text, copy the default settings to user settings and just change the autosave setting to
trueand the single quotes setting totrue
-
After they are installed use this gist to set their preferences
- You may have to remove the theme from the preferences and manually intall it
-
Make Chrome your default browser
- I Use Emmet to create a quick dummy.html file inside a folder on my desktop
- I right click on file and choose Open in finder
- I right click file and choose get info and make these changes
- Download Mac2Imgur
- Sign up for an account
- Install Alfred App
- Web-Dev-Notes
- Fork my repo
https://github.com/kingluddite/web-dev-notes - Save them to
~/Documents/dev - Create an alias inside
.zshrc
- Fork my repo
See hidden files
When working with zsh you will want to see hidden files. Just add the code below to get it to work.
source: show hidden files on mac
$ defaults write com.apple.finder AppleShowAllFiles YES
- Add these alias' to your .zshrc
# =================
# Aliases
# =================
# =================
# Web Dev Tools
# =================
# open bash config file (.bash_profile)
alias bsh='sublime ~/.bash_profile'
# open zsh config file (.zshrc)
alias zash='sublime ~/.zshrc'
# refresh the bash
alias refrash='source ~/.bash_profile'
# refrash the zsh
alias zfrash='source ~/.zshrc'
# sass
alias sasswatch='sass --watch scss:css'
# =================
# My Web Dev Notes
# =================
alias notes='cd ~/Documents/dev/web-dev-notes'
# =================
# Navigate Files
# =================
alias md='mkdir'
alias sites='cd ~/Sites/'
alias dev='cd ~/Documents/dev'
alias desk='cd ~/Desktop'
alias ..='cd ../'
# go back one directory
alias b='cd ..'
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 dir
# History lists your previously entered commands
alias h='history'
# confirm before executing and be verbose
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -iv'
alias mkdir='mkdir -pv'
# ================
# OS Aliases
# ================
# Show all processes running
alias ps='ps aux'
# Hide/show all desktop icons (useful when presenting)
alias hide_desktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias show_desktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# Hide/show hidden files in Finder
alias hide_files="defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder"
alias show_files="defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder"
# ================
# Application Aliases
# ================
alias chrome='open -a "Google Chrome"'
alias db='cd ~/Dropbox'
alias sop='sublime .'
alias phub='hub browse .'
# =================
# Mongo Stuff
# =================
# Kill Mongo process when it gets hung up
alias monkill='ps aux | grep mongod'
alias fm='ps aux | grep mongo'
# http://jorge.fbarr.net/2011/03/24/making-your-bash-history-more-efficient/
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
# don't put duplicate lines in the history.
export HISTCONTROL=ignoredups
# ignore same sucessive entries.
export HISTCONTROL=ignoreboth
# Make some commands not show up in history
export HISTIGNORE="h"
# ====================
# Git Aliases
# ====================
alias gs='git status'
alias gap='git add -p'
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gob='git checkout -b '
alias gk='gitk --all&'
alias gx='gitx --all'
alias glog='git log --pretty=oneline --abbrev-commit'
alias up='git pull upstream master'
alias upandaway='git pull upstream master && git push origin master'
# when I mispell git commands the following 2 commands help
alias got='git '
alias get='git '
- open in sublime text command
$ sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
- Add LastPass Chrome Extension
- I created an account already and use that for password management
- Store important info in vault
note: By default Vim mode is turn off, so you are turning it on by making sure it is not ignored.
{
"ignored_packages":
[]
}I like to add a keyboard shortcut to quickly enter Vintage Mode. There is an option to jump right into Vintage Mode when you open Sublime Text but I'm not a fan of that. With the following key binding implemented, I can quickly jump into Vintage mode by just typing the j + j key binding keyboard shortcut. Here's how you set this up.
Sublime Text 3 > Preferences > Key Bindings - User
Add this code:
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
}- This make remember common files you were working on a snap
$ touch ~/z.sh- Copy this code and place it inside
~/z.sh - Then, in your
.zshrcfile, include the following and then source your.zshrcfile again.
# include Z, yo
. ~/z.sh
Install zsh-syntax-highlighting
Install tree $ brew install tree
Then make sure your directories aren't too long
function t() {
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2 }
Use Trash CLI instead of the more dangerous and permanent $ rm -rf yada-yada-yada
$ npm install --global trash-cli
Make your return key escape (great for vim)
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"$ brew update$ brew tap homebrew/php- Install PHP 7.0.+
$ brew install php70
- Install mcrypt
$ brew install mcrypt php70-mcrypt
- Finally, install composer
$ brew install composer
- Test
- Now if you run
$ php -v, you will get PHP 5.5 or something - This is the default PHP version that is shipped with OSX and cannot be removed
- You just need to edit your path to ensure that PHP 7.0 is picked up in your
.zshrcfile
export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"
- You can add multiple paths - just separate each path with colons
:- Like this:
export PATH="$HOME/.npm-packages/bin:$(brew --prefix homebrew/php/php70)/bin:$PATH"
- To debug any issue with any package, you can run
$ brew info php70etc - Also, if you are getting seemingly unrelated errors, make sure to update bash/zsh:
$ brew upgrade bashand$ brew upgrade zsh - If everything is setup correctly, running
$ php -vshould give you 7.0.+







