Mint 17 Qiana – Rails/Node Developer Setup

Based on a fresh install of Cinnamon 64bit flavor of Mint 17 “Qiana”

Estimated time: 1 hour

Display Driver

Super and type “driver management”

Switch to the latest proprietary driver

Chrome

Text Tools

One of the following is good. Sublime is more stable in linux but atom will eventually win and has promised a linux version eventually (current mac-first). If you prefer an IDE, then RubyMine is for you.

Sublime

A stable, keyboard-first text editor

Install

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

Install package control

  1. Launch sublime

  2. Ctrl + `

  3. Copy the command from here

Useful packages (ctrl + shfit + p and type “install packages”)
* GitGutter
* SideBarEnhancements
* Github Tools
* LESS
* Better CoffeeScript

Sublime quick reference

Command Hotkey Command
Command Palette (search for commands) ctrl + shfit + p
File Switching ctrl + p
Goto Symbols ctrl + p
Select current word and then next same word ctrl + d
Reveal file in sidebar unmapped reveal_in_side_bar
Focus sidebar (move around in sidebar) ctrl + 0

An example custom keybinding (Preferences >> Key Bindings – User)

{ "keys": ["ctrl+o"], "command": "reveal_in_side_bar"}

Atom

Moving fast and no official linux support but has great git integration, built in package manger with tons of great packages and it’s completely FOSS so will probably beat out sublime if they deliver the promised linux version.

sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom

Ruby Mine

  1. Download it from here

  2. Extract the tar file to

    cd ~/Downloads
    tar -xvzf <>.tar.gz ~/Applications/RubyMine-<<x.y.z>>
    sudo apt-get install default-jdk
    cd ~/Applications/RubyMine-<<x.y.z>>/bin
    ./rubymine.sh

Git

Atom as editor

git config --global core.editor "atom --wait"

Sublime as editor

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

Git cola (gui from the github guys, seems really solid)

apt-get install git-cola
git cola
# diagrams
git dag

Github RSA Keys

cd ~/.ssh
ssh-keygen -t rsa -C "Github Key"

Copy paste into github profile the generated .pub

node

sudo apt-get install nodejs
sudo apt-get install nodejs-legacy
sudo apt-get install npm
PATH#$PATH:~/opt/bin
sudo npm install bower -g

rbenv (and ruby!)

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH#"$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

echo 'eval "$(rbenv init -)"' >> ~/.bashrc
rbenv init -

#ruby compilation dependencies
apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g    -dev
rbenv install 2.1.2

echo 'eval "$(rbenv global 2.1.2)"' >> ~/.bashrc
rbenv global 2.1.2
# ruby build -- for installing ruby versions 
# Why is this separate from rbenv? Our one goal is to install ruby versions but you need this plugin LOLOLOLOLOL
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

sudo apt-get install libpq-dev

gem install rails --no-document
gem install pg

Postgres

sudo apt-get install postgresql postgresql-contrib
sudo apt-get install postgresql-contrib
sudo apt-get install pgadmin3
sudo apt-get install postgresql-client
sudo apt-get install postgres-xc-client
sudo apt-get install postgres-xc

# Server Setup 
sudo -u postgres psql postgres
\password postgres

let postgres know your password. This will be used globally. The two asterisks are port and database name.

touch ~/.pgpass
echo "127.0.0.1:*:*:postgres:passwordYouJustEnteredGoesHere" >> ~/.pgpass
chmod 0600 ~/.pgpass

run the server

postgres -D /path/you/want/your/db/data

Sql Server Driver

sudo apt-get install freetds-dev

MongoDb

Mongo DB

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org

Robomongo Mongo UI

Do stuff with it

Start

    sudo /etc/init.d/mongod start

Tail

    tail /var/log/mongodb/mongod.log

Stop

    sudo /etc/init.d/mongod stop

Restart mongo 

    sudo /etc/init.d/mongod restart

Slack

Spotify

Will sometimes crash since it is beta. Social buttons seem to set it off.

echo "deb http://repository.spotify.com stable non-free" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59
sudo apt-get update
sudo apt-get install spotify-client

Important To Know

  • Moving windows is done with super + arrow

  • Moving windows between monitors

    I cannot figure out how to do it in a generic way. :( Compiz doesn’t work with cinnamon. Some bullshit scripts here

  • Increase bash history

    echo "export HISTSIZE#9999" >> ~/.profile
    echo "export HISTFILESIZE#9999" >> ~/.profile
    
  • Killing a frozen process

    Find a pid

    pidof synap # start of synaptic
    # or
    ps aux | grep syn
    kill 3486 # pid you got from the last step
    

    More powerful kill (overrides open sockets)

    kill -15
    

Nuke the entire site from orbit, it’s the only way to be sure

    kill -9 3486
  • restart x server in cinammon

    alt + f2, then r

  • Save your bash history somewhere (useful for writing this document or a bash script)

    history -w ~/history.txt

  • move between workspaces

    Ctrl + Alt + Arrows

Posted in Programming | Tagged , , , , , , , , , , | Leave a comment

Getting Aptana working under Ubuntu 11.04

Apparently, Unity breaks Aptana’s file menu. Here’s how to get it working

  1. Make sure you have sun java installed (not open).
  2. Extract the zip into /usr/lib/
  3. Then, a work around is necessary in order to get the menu working right under Unity. Create a script with this in it:
    #!/bin/bash
    export UBUNTU_MENUPROXY=0
    ./AptanaStudio3
Posted in Programming | Tagged , , , , | 1 Comment

Creating a script/gui relationship with antlr and C#

I’ll be editing and adding to this post heavily in the near future. I’m about to head to Austin for an interview and just wanted my latest up before taking off.  I also just just posted a new project over at github.

Better tidbits:

AST Evaluation grammar
Parser/Lexer grammar

Business Logic Layer and the Toggle interface control implementation of IMeta

Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

The Beast lives!

THE BEAST lives!

Play music to fully enter the lair.

The Beast, to those that know her, is a notorious, merciless home wrecker. In a fast paced game of cards, the odds drift elusively in your favor, and then, the beast takes off an arm. Taming her is a challenge worthy of today’s cell phone gamer.

That was the tag line for my newly-open-sourced cell phone game, The Beast! Continue reading

Posted in Game Development, Programming | Tagged , , , , , | Leave a comment

Refactoring refrain

In an effort to become more prolific and less of a perfectionist, I’ve decided to post all my nerdy endeavors, including mistakes. The original program I’m discussing in this article can be found in source here or explained here.

Today, I loaded up my billing parser and saw this:
Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Line of Business Financial Billing Parser

This article describes a program which parses an excel file for information and then, using data driven design, solicits user input for the final valuation of the data.
Full source code available in an open source github repository.

The problem:

A Directv installation company recently hired me because they had a problem: they get paid in bulk and really had no idea what they were getting paid for because their client was just handing them a check. The only thing they were given as an invoice was a normalized database dump. They had no idea what to do with this information so asked me to write something that would tell them exactly how much they were supposed to be paid. Stripped of any proprietary information, the database dump looks like this with approximately 2000 more entries:

Activity Number Order Sub Type OLI Number Product Line Access Card Number
1-VUE1JLK New Install 1 IRD – STANDARD 002212408963
1-VUE1JLK New Install 3 Multi-Switch 002331691473

Continue reading

Posted in Programming | Tagged , , , , , , | 1 Comment

Creating user interfaces dynamically

This was my first foray into content driven design and was a lot of fun to develop in WPF.  The idea was to create a centralized cloud delivery method for third party scripts, HUDs, and modifications for a variety of games on the PC platform. Using ANTLR to generate a parser, I made it understand Source engine’s scripting language as a starting poing and it generates user interfaces so that end users can easily modify important attributes of a script. This is generic, so it works over all TF2 and many CSS scripts and could easily be augmented to understand scripting languages in other games. It’s about 60-70% done. The parser and interface generation is complete, but I really need to finish the cloud features to publish it or it’s kind of pointless.

On a side note, I don’t quite understand why Steam doesn’t do this already. Anything that brings third party developers closer to consumers is kind of Valve’s thing. I really need to touch this thing up and publish it.

Posted in Programming | Tagged , , , , , , , | Leave a comment

Ze Germans!

One day, I will get around to rigging this thing.

Posted in Modeling | Leave a comment

First post!

Let’s start this thing off with some work I did with my roomates. This was done in UT2004 and I remember that waterfall looking like it had more hours of my life in it.

Posted in Game Development | Leave a comment