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
function point() {
var p = {};
p.position = 0;
p.move = function (pixels) {
p.position += pixels;
};
p.up = function () { p.move(10); };
p.down = function () { p.move(-10); };
<ul>
<% for user in @users %>
<li><%= user.id.to_s + ': ' + user.name + ' <'+ user.email + '>' %></li>
<% end %>
</ul>
get '/' do
@users = User.all
erb :index
end
class User < ActiveRecord::Base
end
require 'haml'
get '/' do
haml :index
end
require 'erb'
get '/' do
erb :index
end
require 'sass'
get '/stylesheet.css' do
sass :stylesheet
end
require 'sass'
get '/stylesheet.css' do
scss :stylesheet
end
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'sinatra_application.sqlite3.db'
)