Skip to content

Instantly share code, notes, and snippets.

View adamdilek's full-sized avatar
🎯
focusing

Adam Dilek adamdilek

🎯
focusing
View GitHub Profile

Project Name

Requirements

Before generating your application, you will need:

2013-01-29T10:15:09+00:00 heroku[router]: at=info method=GET path=/zones host=peaceful-dawn-8702.herokuapp.com fwd=78.189.74.78 dyno=web.1 queue=0 wait=0ms connect=1ms service=127ms status=304 bytes=0
2013-01-29T10:15:11+00:00 app[web.1]: Started GET "/zones/5/edit" for 78.189.74.78 at 2013-01-29 10:15:11 +0000
2013-01-29T10:15:18+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.11/lib/active_model/serialization.rb:78: [BUG] Segmentation fault
2013-01-29T10:15:18+00:00 app[web.1]: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
2013-01-29T10:15:18+00:00 app[web.1]:
2013-01-29T10:15:18+00:00 app[web.1]: -- control frame ----------
2013-01-29T10:15:18+00:00 app[web.1]: c:2238 p:---- s:8090 b:8090 l:008089 d:008089 CFUNC :-
2013-01-29T10:15:18+00:00 app[web.1]: c:2237 p:0136 s:8086 b:8086 l:008085 d:008085 METHOD /app/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.11/lib/active_model/serialization.rb:78
2013-01-29T10:15:18+00:00 app[web.1]: c:2236 p:0122 s:8077 b:8077 l:008076 d:00
Started GET "/zones/1/edit" for 127.0.0.1 at 2013-01-29 12:20:49 +0200
Processing by ZonesController#edit as HTML
Parameters: {"id"=>"1"}
Zone Load (0.3ms) SELECT "zones".* FROM "zones" WHERE "zones"."id" = ? LIMIT 1 [["id", "1"]]
Rendered zones/_form.html.erb (4.8ms)
Rendered zones/edit.html.erb within layouts/application (13.0ms)
Completed 200 OK in 127ms (Views: 124.6ms | ActiveRecord: 0.3ms)
Zone Load (4.8ms) SELECT "zones".* FROM "zones"
SystemStackError (stack level too deep):
@adamdilek
adamdilek / error.log
Last active December 12, 2015 05:38
erro deploy
** transaction: commit
* 2013-02-06 17:31:43 executing `deploy:migrate'
* executing "cd /home/deployer/apps/barondom/releases/20130206152734 && /home/deployer/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle exec rake RAILS_ENV=production db:migrate"
servers: ["159.253.35.13"]
[159.253.35.13] executing command
command finished in 11492ms
* 2013-02-06 17:31:55 executing `deploy:start'
* executing "/etc/init.d/unicorn_barondom start"
servers: ["159.253.35.13"]
[159.253.35.13] executing command
@adamdilek
adamdilek / lab2023blog-super_hero.rb
Created April 2, 2013 07:28
Rails 4 absence validation
class SuperHero
include ActiveModel::Validations
attr_accessor :secret_identity
validates :secret_identity, absence: true
end
@adamdilek
adamdilek / lab2023blog-absence-example-rb
Created April 2, 2013 07:30
Absence validator example
super_hero = SuperHero.new
super_hero.valid?
# => true
super_hero.secret_identity = 'Hal Jordan'
super_hero.valid?
# => false
@adamdilek
adamdilek / current_ability.rb
Created April 22, 2013 13:37
Current ability
def current_ability
@current_ability ||= AdminAbility.new(current_admin)
end
>> (reservation.start_date...reservation.finish_date).each{|date| puts date}
2013-04-27
2013-04-28
2013-04-29
Sat, 27 Apr 2013...Tue, 30 Apr 2013
>> @array = Array.new
[]
>> (reservation.start_date...reservation.finish_date).each{|date| @array << date}
@adamdilek
adamdilek / resque.rb
Last active December 17, 2015 00:59
God ile resque ayaklandırmak
# Prosesi öldürmek
sudo kill -9 `ps aux | grep [r]esque | grep -v grep | cut -c 10-16`
# Ayaklandırmak
rvmsudo god -c /etc/god/resque.god -D
@adamdilek
adamdilek / gems.md
Last active December 17, 2015 05:48
lab2023 gems train

Tayfun ÖZİŞ ERİKAN

  • compass-rails
  • haml
  • haml-rails
  • bootstrap-saas

Hamit TÜRKÜ KAYA

  • devise_invitable