Skip to content

Instantly share code, notes, and snippets.

View barsukov's full-sized avatar

Wowa Barsukov barsukov

  • Berlin, Germany
View GitHub Profile
* https://habrahabr.ru/post/212323/
* http://eax.me/burnout/
* http://blogerator.ru/page/pochemu-vsjo-taki-ne-stoit-programmirovat-po-nocham-zdorovie-melatonin-rabota-nochju-rak-bolezni-programmista
* https://megamozg.ru/post/3692/
* https://megamozg.ru/post/3694/
* https://habrahabr.ru/post/239793/
* https://habrahabr.ru/company/edison/blog/268977/
* https://geektimes.ru/post/262344/
burnout prevention: https://gist.github.com/ypetya/7a9f4ed3621c3c20a762
@barsukov
barsukov / web-servers.md
Created June 16, 2016 15:49 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

Factory.define :item do |f|
include ActionDispatch::TestProcess
f.name "Macbook Pro 15"
f.price_in_dollars 1500
f.photo fixture_file_upload('/files/avatar.jpg', 'image/jpg')
end

Capybara

save_and_open_page

Matchers

have_button(locator)
#Session controller provides a token
#/controllers/api/sessions_controller.rb
class Api::SessionsController < Devise::SessionsController
before_filter :authenticate_user!, :except => [:create]
before_filter :ensure_params_exist, :except => [:destroy]
respond_to :json
def create
resource = User.find_for_database_authentication(:email => params[:user_login][:email])
return invalid_login_attempt unless resource