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
require 'haml'
get '/' do
haml :index
end
class User < ActiveRecord::Base
end
get '/' do
@users = User.all
erb :index
end
<ul>
<% for user in @users %>
<li><%= user.id.to_s + ': ' + user.name + ' <'+ user.email + '>' %></li>
<% end %>
</ul>
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); };
function point() {
var a = {};
return a.position = 0, a.move = function(b) {
a.position += b;
}, a.up = function() {
a.move(10);
}, a.down = function() {
a.move(-10);
}, a;
};
function point() {
var p = {};
p.position = 0;
function move (pixels) {
p.position += pixels;
};
p.up = function () { p.move(10); };
p.down = function () { p.move(-10); };
function point() {
function b(b) {
a.position += b;
}
var a = {};
return a.position = 0, a.up = function() {
a.move(10);
}, a.down = function() {
a.move(-10);
}, a;
function logStyles() {
var doc_style = document.body.style;
console.log(doc_style.border,
doc_style.margin,
doc_style.padding);
}
function logStyles() {
var a = document.body.style;
console.log(a.border, a.margin, a.padding);
};