Skip to content

Instantly share code, notes, and snippets.

@dmons
dmons / controller.rb
Created March 20, 2015 15:54
Refactor controller's code.
def update
if params[:credit_card]
#process order
response = @order.process(params)
if response[:status] == "success"
render :template => "orders/show"
else
render :json => response
end
else
@dmons
dmons / logo.css
Last active August 29, 2015 14:02
Work on markup
.logo{
background: url("/static/logo.png") no-repeat 0 0;
width: 181px;
height: 37px
display: inline-block;
margin-top: 20px
margin-left: 40px;
}
@dmons
dmons / .bashrc
Created July 22, 2013 15:42
My terminal config
# setup color variables
color_is_on=
color_red=
color_green=
color_yellow=
color_blue=
color_white=
color_gray=
color_bg_red=
color_off=
@dmons
dmons / Gemfile
Created May 28, 2013 08:41
Integration ExceptionNotification into app
gem 'exception_notification', :require => 'exception_notifier'
В следующих конструкциях в качестве прямого дополнения может употребляться инфинитив или герундий (-ing form).
Подлежащее Сказуемое Прямое дополнение Перевод
She likes to walk. Она любит ходить пешком.
She likes walking. Она любит прогулки пешком.
ГЛАГОЛЫ, ПОСЛЕ КОТОРЫХ ГЕРУНДИЙ И ИНФИНИТИВ УПОТРЕБЛЯЮТСЯ БЕЗ ИЗМЕНЕНИЯ СМЫСЛА
begin - начинать(ся)
continue - продолжать(ся)
prefer - предпочитать