Skip to content

Instantly share code, notes, and snippets.

@anyley
anyley / new.html.slim
Created October 8, 2016 21:59
Форма логина для devis
.panel.panel-default.devise-bs
.panel-heading.draggable drag=".login-screen"
h4.draggable.draggable drag=".login-screen" = t('.sign_in', :default => "Sign in")
.panel-body
= form_for(resource, as: resource_name, url: session_path(resource_name), html: { role: "form" }) do |f|
.form-group
= f.label :email
= f.email_field :email, autofocus: true, class: "form-control"
.form-group
= f.label :password
const {
createStore,
combineReducers,
applyMiddleware,
bindActionCreators
} = Redux
const { default: createSagaMiddleware, effects } = ReduxSaga
const { take, put, call, fork, join, cancel, race } = effects
@anyley
anyley / saga-websocket-iterator.js
Created September 1, 2016 23:01
saga websocket iterator
// Event iterator for socket events
function socketEventIterator(event) {
let deferred
socket.subscribe(event, payload => {
if(deferred) {
deferred.resolve(payload)
deferred = null
}
}
module $1
class $2
$3
end
end