jellekralt / My-OSX-Devset

This repo describes my favorite tools and settings for web development on OSX (Node.js, JavaScript, SASS, ColdFusion, etc)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My OSX Devset

This repo describes my favorite tools and settings for web development on OSX (Node.js, JavaScript, SASS, ColdFusion, etc) This list is ordered by installation order which I used the last time I reinstalled my system.

Software

As an editor I prefer Sublime Text. Also, I really like to start it from the command line, by adding the command line tool.

This should be pretty obvious (seeing as this guide is hosted on Github)

Install

Git comes with the XCode command line tools, this is the easiest way to get git because you will probably need the XCode command line tools anyway. This version of git is however not the most recent. I personally prefer to install a newer version by downloading the binary installer from git-scm.com.

Configure

I use sublime as my default editor for git

git config --global core.editor "subl -n -w"

Homebrew installs the stuff you need that Apple didn’t.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.

Install

Use the installer provided on nodejs.org

Configure

To prevent access errors you should chown the ~/.npm folder

cd ~/.npm/
sudo chown $USERNAME$ *

Replace $USERNAME$ with your own username

gem install sass
gem install compass

Although the editor is awesome, I really hate the icon, I solve this by replacing the default icon by this beautiful icon by Dmitry Svetlichny.

I also like to be able to run sublime from the terminal, if you follow this explanation you'll be able to run

sublime foldername

to open files / folders in sublime.

Build tools

"The Ultimate Notification System for OS X. Growl is the easiest way to know what's going on with your applications."

Bash configuration

Check out the .bash_profile file in this repo to see my complete bash profile config.

Functions

I use the following .bash_profile functions

Tab naming shortcut

As I mostly have multiple terminal tabs open, I often get confused about what runs in which tab. I found this blogpost with a cool bash function to define a name for your tab.

Add this to your ~/.bash_profile

tabname() {
    export PROMPT_COMMAND='echo -ne "\033]0;'$1'\007"';
}

After adding that and restarting your terminal session you can run:

$> tabname "some tab name"

Simple HTTP Server

Sometimes, I find it useful to open a specific folder as a simple http server to check out some files in my browser (without opening it with file://). I found this little snippet that does just that.

add this to your ~/.bash_profile

server() {
	open "http://localhost:${1}" && python -m SimpleHTTPServer $1
}

After adding that and restarting your terminal session you can run:

$> server 8080

to open a browser and start a simple http server in the folder you are currently working in.

PFX to Cer

I need to convert a lot of PFX (SSL Certificate exports) to a certificate file to install on Amazon ELB's. I use a shortcut to quickly convert the pfx to a cer file

add this to your ~/.bash_profile

pfxtocer() {
	openssl pkcs12 -in $1 -out $2 -nodes
}

After adding that and restarting your terminal session you can run:

$> pfxtocer export.pfx certificate.cer

About

This repo describes my favorite tools and settings for web development on OSX (Node.js, JavaScript, SASS, ColdFusion, etc)


Languages

Language:Shell 100.0%