Skip to content

Instantly share code, notes, and snippets.

View AdrienGiboire's full-sized avatar
🥦
Plant-fueled, you can't test me!

Adrien AdrienGiboire

🥦
Plant-fueled, you can't test me!
View GitHub Profile
@AdrienGiboire
AdrienGiboire / hello_name.rb
Created July 9, 2011 10:44
How to get hello name with Sinatra
get '/hello/:name' do
"Hello #{params[:name]}!"
end
@AdrienGiboire
AdrienGiboire / gist:1073498
Created July 9, 2011 10:42
Routes Explanation with Sinatra
get '/' do
'Montrer quelque chose'
end
post '/' do
'Enregistrer quelque chose'
end
put '/' do
'Mettre à jour quelque chose'
@AdrienGiboire
AdrienGiboire / hello_world.rb
Created July 9, 2011 10:41
Hello_World.rb with Sinatra
require 'sinatra'
get '/' do
'Hello world!'
end
@AdrienGiboire
AdrienGiboire / gist:1071934
Created July 8, 2011 14:15
Installation de la gemme MySQL sur Ubuntu
# Paquets mysql et dev nécessaires pour la gemme mysql :
sudo apt-get install mysql-server mysql-client libmysqlclient-dev libmysqld-dev
# Nécessaire pouir ruby-debug :
sudo apt-get install ruby1.8-dev
# Les paquets Rails incluent pas mal de bonus que vous seriez susceptibles d'apprécier :
sudo gem install rails sqlite3 ruby-debug
# Et enfin, la gemme mysql:
sudo gem install mysql
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
[User, Categorization, Category, Micropost].each(&:delete_all)
User.create({
:username => 'plume',
:email => '[email protected]',
:password => 'adichris',
:password_confirmation => 'adichris'