Skip to content

Instantly share code, notes, and snippets.

View inem's full-sized avatar

Ivan Nemytchenko inem

View GitHub Profile
/Projects/sandbox > rails new datamappify
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
class Treat::Workers::Extractors::NamePrefix::Aaa
Treat::Loaders::Stanford.load
def self.name_prefix(entity, options = {})
proceed entity
end
private
def self.proceed(entity)
return nil if entity.children.empty?
<label>
Select Field
<div>
<select name="select_tag">
<option value="Empty">Empty</option>
</select>
</div>
</label>
@inem
inem / gist:2766426
Created May 22, 2012 03:40
rails 3 assets silencer
# http://stackoverflow.com/questions/6312448/how-to-disable-logging-of-asset-pipeline-sprockets-messages-in-rails-3-1
if Rails.env.development?
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def call_with_quiet_assets(env)
previous_level = Rails.logger.level
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
call_without_quiet_assets(env)
ensure
Rails.logger.level = previous_level
@inem
inem / gist:2761265
Created May 21, 2012 08:52
toster.ru
Всем привет. В пятницу 25 мая приглашаем всех желающих к нам в офис 7bits посмотреть с нами трансляцию яваскриптового тостера ( http://toster.ru/ ). Начало - в 14:00 по Омску.
Адрес офиса: Омск, ул. Учебная 83, каб. 212
@inem
inem / css_js_principles.txt
Created September 15, 2011 00:41 — forked from astashov/css_js_principles.txt
General Organizational Principles for CSS and JS in Rails
==== General Organizational Principles for CSS and JS in Rails
=== Framework requirements
1. Modularity
2. Complex components are built from simple, atomic components
3. Cross-browser compatibility
a. Follow W3C standards
b. Keep IE hacks in a separate style file
4. Bulletproof
Hi!
I just wanted to say thanks. Thanks a lot!!
I'm working on a project in which I need to serialize some heavy collections including some polymorphic associations.
I don't know if you've thought about that, but with slight modifications Tequila is the best solutions I've found to do just that!
I've added checks when serializing to avoid calling a method/attribute the current object doesn't reply to. Thus, I can have a jazz markup including polymorphic objects (say, "commentable") and include different associations in this commentable, each valid for only a subset of possible commentable objects.
It works like a charm and might be a feature you'd like to include in Tequila for good? (Though now nothing bad happens when I try including an incorrect attribute/association, which could be an issue)
1. Организация процесса тестирования в вебе
2. Организация процесса разработки.
3. Продуктовая разработка. Как, что и проблемы.
4. Работа с заказчиком
- Продажа услуг по продвижению сайтов
- Осведомленность о качественном веб-дизайне. Сложившиеся представления о стоимости разработки сайта.
The Hand: How Its Use Shapes the Brain, Language, and Human Culture - Frank R. Wilson; Paperback
The Back of the Napkin (Expanded Edition): Solving Problems and Selling Ideas with Pictures - Dan Roam; Hardcover
Sketching User Experiences: Getting the Design Right and the Right Design (Interactive Technologies) - Bill Buxton; Paperback
Here Comes Everybody: The Power of Organizing Without Organizations - Clay Shirky; Paperback
Free: The Future of a Radical Price - Chris Anderson; Hardcover
/Projects/rjr > rails console
/Volumes/500/Users/niv/.rvm/gems/jruby-1.4.0/gems/neo4j-1.0.0.beta.20/lib/neo4j.rb:1: uninitialized constant Java (NameError)
from /Projects/rjr/config/application.rb:7:in `require'
from /Projects/rjr/config/application.rb:7
from /Volumes/500/Users/niv/.rvm/gems/jruby-1.4.0/gems/railties-3.0.3/lib/rails/commands.rb:21:in `require'
from /Volumes/500/Users/niv/.rvm/gems/jruby-1.4.0/gems/railties-3.0.3/lib/rails/commands.rb:21
from script/rails:6:in `require'
from script/rails:6
/Projects/rjr > jruby -S rails console
/Projects/rjr/config/application.rb:12: undefined method `env' for Rails:Module (NoMethodError)