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 Application.Views.Users.Login | |
@bindedWith: (selector) -> | |
$(selector).each -> | |
Application.Views.Users.Login($(@)) | |
constructor: (@container) -> | |
_.extend(@, Backbone.Events) | |
@initForm() | |
initForm: => |
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
Before: | |
sudo apt-get -y install gnustep | |
sudo apt-get -y install gnustep-devel | |
sudo apt-get -y install build-essential | |
sudo apt-get -y install gobjc | |
sudo apt-get -y install gnustep-make | |
sudo apt-get -y install libgnustep-base-dev | |
Compiling for one source file (For example main.m): | |
gcc `gnustep-config --objc-flags` main.m -o hello -I /usr/include/GNUstep/ -L /usr/lib/GNUstep/ -lgnustep-base |
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
before: | |
command: rbenv install 1.9.3-p362 | |
output: ruby-build: definition not found: 1.9.3-p362 | |
hack: | |
command: brew unlink ruby-build | |
output: Unlinking /usr/local/Cellar/ruby-build/20121120... 4 links removed | |
command: brew update |
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
2012-10-29T13:15:49Z 4284 TID-oxp71xhu0 XmlFeedWorker MSG-oxp7irbuk INFO: start | |
2012-10-29T13:15:56Z 4284 TID-oxp71xhu0 XmlFeedWorker MSG-oxp7irbuk INFO: fail: 6.626 sec | |
2012-10-29T13:15:56Z 4284 TID-oxp71xhu0 WARN: {"retry"=>true, "queue"=>"default", "class"=>"XmlFeedWorker", "args"=>[], "error_message"=>"ActionController::Metal#session delegated to @_request.session, but @_request is nil: #<TemplatesController:0x007ff61b9f3788 @_routes=nil, @_action_has_layout=true, @_headers={\"Content-Type\"=>\"text/html\"}, @_status=200, @_request=nil, @_response=nil, @_prefixes=[\"templates\", \"application\"], @_config={}, @_lookup_context=#<ActionView::LookupContext:0x007ff6202a3730 @details_key=#<ActionView::LookupContext::DetailsKey:0x007ff61cb66e70 @hash=-3365680752233435110>, @details={:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml, :slim]}, @skip_default_locale=false, @cache=true, @prefixes=[\"templates\", \"application\"], @rendered_format=:html, @view_paths=#<ActionView::PathSet:0 |
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
actionpack (3.2.8) lib/action_view/base.rb:209:in `initialize' | |
app/builders/templates_builder.rb:3:in `new' | |
app/builders/templates_builder.rb:3:in `process' | |
app/controllers/templates_controller.rb:6:in `create' | |
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action' | |
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action' | |
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action' | |
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action' | |
activesupport (3.2.8) lib/active_support/callbacks.rb:436:in `_run__2734696839539265386__process_action__2538432014012520187__callbacks' | |
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' |
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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev lib64readline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
make install |
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
/^([0-9]{3}([0-9]{3})?|[0-9]{4})$/ -> 111. 1111, 111111 |
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 EmploymentInformation < ActiveRecord::Base | |
attr_accessible :employment_status_id, :company_name, :university | |
validates :employment_status_id, :presence => true, :inclusion => { :in => proc { |req| req.employment_status_types.map{ |key, value| key } } } | |
validates :company_name, :presence => true, :format => { :with => /\A[A-z\s\-\._]+\z/ }, :unless => proc { |req| req.employment_status.nil? } | |
validates :university, :presence => true, :format => { :with => /\A[A-z\s\-\._]+\z/ }, :unless => proc { |req| req.employment_status.nil? } | |
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 Person | |
validates :gender_id, :presence => true, :inclusion => { :in => proc { |req| req.gender_types.map{ |key, value| key } } } #req - self 'Person' object | |
validates :title_id, :presence => true, :inclusion => { :in => proc { |req| req.title_types.map{ |key, value| key } } } | |
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
@file = YAML.load_file("#{Rails.root.join('path/to/folder', 'file.yml')}") |