Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install build-essential ruby-dev libxml++2.6-dev libsqlite3-dev nodejs sudo gem install rails cd /tmp rails new test cd test rails server

now go to http://localhost:3000 in your browser, you should see a welcome page.

" Usage:
"
" Create a project from the current nerdtree with
" :NERDTreeProjectSave <name>
"
" Load a project with
" :NERDTreeProjectLoad <name>
"
" Delete a project with
" :NERDTreeProjectRm <name>
@scrooloose
scrooloose / hax0r.vim
Created January 10, 2012 10:03 — forked from asgeo1/hax0r.vim
NERDTree custom mappings to make i and s reuse existing windows
let g:NERDTreeCustomReuseWindows = '1'
call NERDTreeAddKeyMap({
\ 'key': 'w',
\ 'scope': 'all',
\ 'callback': 'NERDTreeCustomToggleReuse',
\ 'quickhelpText': 'Toggle use existing windows' })
function! NERDTreeCustomToggleReuse()
let g:NERDTreeCustomReuseWindows = g:NERDTreeCustomReuseWindows ? 0 : 1
"visual search mappings
function! s:VSetSearch()
let temp = @@
norm! gvy
let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g')
let @@ = temp
endfunction
vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR>
vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR>
"chuck this in ~/.vim/nerdtree_plugin/coffee_filter.vim (see what I did there?)
if exists("g:loaded_nerdtree_js_filter")
finish
endif
let g:loaded_nerdtree_js_filter = 1
let s:extMatch = '\.\(js\|js\.map\)$'
call g:NERDTree.AddPathFilter("FilterCoffee")
@scrooloose
scrooloose / grep_menuitem.vim
Created October 9, 2009 06:58
nerdtree plugin to integrate nerdtree with :grep
if exists("g:loaded_nerdtree_grep_menuitem")
finish
endif
let g:loaded_nerdtree_grep_menuitem = 1
if !executable("grep")
finish
endif
call NERDTreeAddMenuItem({
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: sans-serif; /* 1 */
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<!--add a couple of gists to the page-->
<script src="http://gist.github.com/454771.js?file=line_number_hacker.js"></script>
<script src="http://gist.github.com/450963.js?file=startshell_mapping.vim"></script>
@scrooloose
scrooloose / gist-line-number-hack.js
Created June 27, 2010 08:59
A hack to add line numbers to gists, requires jquery
function addLineNumbersToAllGists() {
$('.gist').each( function() {
_addLineNumbersToGist('#' + $(this).attr('id'));
});
}
function addLineNumbersToGist(id) {
_addLineNumbersToGist('#gist-' + id);
}
@scrooloose
scrooloose / hax0r.vim
Created January 5, 2012 20:23
NERDTree custom mappings to make i and s reuse existing windows
call NERDTreeAddKeyMap({
\ 'key': 'i',
\ 'scope': 'FileNode',
\ 'callback': "NERDTreeCustomOpenSplit",
\ 'quickhelpText': 'open split reusing if able' })
function! NERDTreeCustomOpenSplit(node)
call a:node.open({'split': 'h', 'reuse': 1})