Skip to content

Instantly share code, notes, and snippets.

@tnarik
Last active December 18, 2015 20:49
Show Gist options
  • Save tnarik/5842770 to your computer and use it in GitHub Desktop.
Save tnarik/5842770 to your computer and use it in GitHub Desktop.
Setting up a development environment
echo "choose a name for your new (RSA 4KB) key such as: id_rsa_tnarik_resma"
ssh-keygen -t rsa -b 4096 -C "tnarik@lecafeautomatique.co.uk"
####ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
\curl -L https://get.rvm.io | bash
echo "rvm_install_on_use_flag=1" > ~/.rvmrc
### Sourcing the RVM script adds the rvm to the PATH automatically.
####echo "configuring GIT"
####\curl -L https://get-git.rvm.io | bash
git config --global user.name "tnarik"
git config --global user.email tnarik@gmail.com
git config --global color.branch auto
git config --global color.diff auto
git config --global color.status auto
git config --global color.interactive auto
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.st status
git config --global core.editor "subl -w"
git config --global core.excludesfile /Users/tnarik/.gitignore_global
# This is new from GIT 2.0 (it makes you push only the current branch).
git config --global push.default simple
echo ".DS_Store" > ~/.gitignore_global
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
echo "just so that Homebrew is installed and manages rvm requirements"
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
(or ```ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"``` )
rvm autolibs homebrew
rvm requirements
echo "Let's add Sublime Text as a command line tool"
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
# Install the Package Control (take a look at https://sublime.wbond.net/)
https://sublime.wbond.net/installation
=========
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
echo "install QT for Capybara-webkit"
brew update
brew install qt
echo "with this, I can run my bundle installs without issues, it seems."
vagrant plugin install vagrant-berkshelf
echo "get all the source code from the different repositories and, on mac, add a path to /etc/paths (/usr/loca/git/bin ?), and drop there all your git-* custom commands.
=====================================
# MacPorts Installer addition on 2010-02-20_at_23:01:43: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# Manually added
PATH_ANDROID_SDK=/Applications/android-sdk-macosx/
export PATH=$PATH_ANDROID_SDK/tools:$PATH_ANDROID_SDK/platform-tools:$PATH
export PATH=./:$PATH
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
# Setting PATH for MacPython 2.6
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# Setting prompt for RVM
export PS1="\[\033[0;32m\]\$(~/.rvm/bin/rvm-prompt) \[\033[00m\]\h:\w\[\033[01;36m\]\$(parse_git_branch) \[\033[00m\]\u\$ "
=============================================
Instead could use # oh-my-zsh
```curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh```
and the lecafeautomatique theme.
# Tree
And now let's get tree: ```brew install tree```
# direnv
```brew install direnv```
add ```eval "$(direnv hook $0)"``` to the end of ~/.zshrc
# Disable the dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES && killall Dock
# And remove the dashboard Space
Update ZSH on Mountain Lion
```brew install zsh```
It's now installed under '/usr/local/bin/zsh'.
In Mountain Lion needs to be added to '/etc/shells'
```chsh -s /usr/local/bin/zsh ${USER}```
To get JAVA HOME:
export JAVA_HOME=$(/usr/libexec/java_home)
, as per http://stackoverflow.com/questions/1348842/what-should-i-set-java-home-to-on-osx
#Lets add a bit more of chaos here: Ruby on Rails style now
>> brew install qt
# This is needed for capybara-webkit
## This is to get packer from the binaries (not the official method, but seems to work correctly).
$ brew tap homebrew/binary
$ brew install packer
#the 'pg' gem should be needed in DEV
#We could just make it not install in DEV
```bundle install --without production```
#, but let's try to install it on Mavericks (https://bitbucket.org/ged/ruby-pg/wiki/Home)
*) Get the ZIP, execute the install
*) locate pg_config (for me it is in /Library/PostgreSQL/9.3/bin/pg_config)
# and, now:
```
bundle config build.pg --with-pg-config=/Library/PostgreSQL/9.3/bin/pg_config
bundle
```
brew install cvs
Additionally install JAVA from Oracle as Mavericks doesn't include it.
brew install maven (Mavericks doesn't have it either)
echo "export JAVA_HOME=\`/usr/libexec/java_home -v 1.7\`" > $HOME/.mavenrc (to ensure the latest maven uses java_home).
# For PHP...
brew tap homebrew/homebrew-php
brew install php55-intl
brew install php55-mcrypt
brew install composer
Configure $HOME/.zshenv to use that version of PHP (/usr/local/bin should have precedence in the PATH).
brew install qemu
#For NPM and related (javascript) packages (like grunt)
node-v0.10.28.pkg (```brew install node``` could be used, but it is not recommended).
sudo npm install npm -g
sudo npm install grunt-cli -g
# For Yeoman
sudo npm install -g yo
sudo npm install -g generator-angular
### now, in a project:
```npm init``` and edit the resulting package.json
```npm install grunt --save-dev```
```npm install grunt-contrib-watch --save-dev```
```npm install grunt-shell --save-dev```
Create a ```Gruntfile.js``` with configuration.
To update SQLite browser: [https://github.com/sqlitebrowser/sqlitebrowser]
```
brew install sqlite --with-functions
brew install qt
git clone https://github.com/sqlitebrowser/sqlitebrowser.git
cd sqlitebrowser
qmake
make
mv src/sqlitebrowser.app /Applications/
```
# Parallels for packer (dependencies)
brew tap rickard-von-essen/homebrew-formulae
brew install --HEAD prl-utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment