Skip to content

Instantly share code, notes, and snippets.

class CommentsController < ApplicationController
# POST /comments
# POST /comments.xml
def create
@post = Post.find(params[:post_id])
@comment = @post.comments.create(params[:comment])
respond_to do |format|
format.html { redirect_to post_path(@post) }
format.js
end
@guiceolin
guiceolin / .bashrc
Created July 12, 2011 16:46
bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;35m\]\w\[\033[00m\]'
#Binaries for Android Tools
PATH=${PATH}:~/Documents/android-sdk-mac_86/tools
#Binaries for RVM ( Ruby Virtual Machine )
PATH=${PATH}:~/.rvm/bin
#Git completation on bash terminal
source ~/.git-completion.bash
@guiceolin
guiceolin / .bash_profile
Created October 23, 2011 21:29
Bash profile
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;35m\]\w\[\033[00m\]'
#Bundle binaries
PATH=./bin:${PATH}
#Binaries for Android Tools
PATH=${PATH}:~/Documents/android-sdk-mac_86/tools
#Binaries for RVM ( Ruby Virtual Machine )
PATH=${PATH}:~/.rvm/bin
@guiceolin
guiceolin / Tutorial.md
Last active May 9, 2018 11:56
Guia de instalação - Ambiente de desenvolvimento no ubuntu

Guia de instalação - Ambiente de desenvolvimento no ubuntu

Este tutorial contempla a instalação de um ambiente completo para desenvolvimento ruby/rails em uma maquina com SO ubuntu

Softwares necessários:

Softwares necessários, em ordem de instalação:

@guiceolin
guiceolin / rbenv-install-system-wide.sh
Created June 22, 2012 15:08 — forked from jnx/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@guiceolin
guiceolin / Posts.text
Created August 14, 2012 11:14
Posts about git
http://nvie.com/posts/a-successful-git-branching-model/
http://perl.plover.com/classes/git/samples/slide001.html
http://newartisans.com/2008/04/git-from-the-bottom-up/
class TestCase
class << self
@@depth = 0
@@out = ""
def test(*args, &block)
method_missing(:test, args, block)
end
def method_missing(sym, *args, &block)

ruby-1.9.3-p429 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

'use strict';
angular.module('tmpApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider, $locationProvider, $httpProvider) {
$routeProvider