This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_many :dvds | |
end | |
class Dvd < ActiveRecord::Base | |
belongs_to :user | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order < ActiveRecord::Base | |
delegate :name, :price, to: :item, prefix: true, allow_nil: true | |
delegate :number, to: :invoice, prefix: true, allow_nil: true | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream puma_upstream { # rename this to be unique | |
server unix://path/to/sock; | |
} | |
server { | |
listen 80; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
server_name example.com; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.swp | |
*.orig | |
/.idea | |
/tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app server | |
gem 'puma' | |
# Factories for testing https://github.com/thoughtbot/factory_girl | |
gem 'factory_girl' | |
# Random data https://github.com/stympy/faker | |
gem 'faker' | |
# easy breadcrumbs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listen-address=127.0.0.1 | |
address=/.dev/127.0.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host vps1 | |
IdentityFile ~/.ssh/vps1 | |
Port 5432 | |
Hostname 11.22.33.44 | |
User root | |
Host vps2 | |
IdentityFile ~/.ssh/vps2 | |
Port 22 | |
Hostname 12.34.56.78 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 49344cfeb2f57347a09f0b5764c25792a2768d71 Mon Sep 17 00:00:00 2001 | |
From: Mohammad AbuShady <[email protected]> | |
Date: Sun, 31 Aug 2014 14:34:58 +0300 | |
Subject: [PATCH] Fix security vulnerability in rater_controller | |
--- | |
app/controllers/rater_controller.rb | 21 ++++++++------------- | |
1 file changed, 8 insertions(+), 13 deletions(-) | |
diff --git a/app/controllers/rater_controller.rb b/app/controllers/rater_controller.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y = [1,2,3,4].collect {|number| number ** 2 } | |
# y will equal [1, 4, 9, 16] |
NewerOlder