Skip to content

Instantly share code, notes, and snippets.

☀️
Catching the sun

Dmitry Polushkin dmitry

☀️
Catching the sun
Block or report user

Report or block dmitry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dmitry
dmitry / test.rb
Created Jul 11, 2014
puffing-billy
View test.rb
require 'puffing-billy'
require 'billy'
Capybara.javascript_driver = :poltergeist_billy
Billy.configure do |c|
c.cache = true
c.cache_request_headers = true
c.ignore_params = []
c.path_blacklist = []
View cucumber-poltergeist.md
puts page.driver.network_traffic.map(&:url)
save_and_open_page
screenshot_and_open_image
View record-gif-screencast.md
sudo add-apt-repository ppa:fossfreedom/byzanz
sudo apt-get update && sudo apt-get install byzanz

byzanz-record --duration=15 --x=200 --y=300 --width=700 --height=400 out.gif
View find_class_duplicates.rb
classes = []
Dir.glob("test/**/*").each do |v|
begin
if File.file?(v)
classes << File.read(v).match(/class ([a-z0-9\:_]+)/i)[1]
end
rescue Exception => e
end
end
@dmitry
dmitry / why_test.md
Last active Aug 29, 2015
Why should I write tests?
View why_test.md

Why test?

  • Design API;
  • Make sure code is working as it should;
  • Regression check.

Look how it's easy - all about time:

  • plan (before);
  • implement (current);
@dmitry
dmitry / application_policy.rb
Last active Aug 29, 2015
application_policy.rb with permitted_params or permitted_attributes used in active_admin
View application_policy.rb
class ApplicationPolicy
attr_reader :user, :record
def initialize(user, record)
@user = user
@record = record
end
def index?
true
@dmitry
dmitry / readme.md
Last active Aug 29, 2015
Ideas of my perfect web development workflow
View readme.md

First of I would like to list all the steps how to get the money result without stress.

Router

Router is a state binding.

@dmitry
dmitry / readme.md
Last active Aug 29, 2015
Information types and characteristics
View readme.md

More contextual information - more TTL. NB! Not always.

Different types of information differentiated by a human. It's clearly can be seen that it's ordered by the quantity of information.

  • Chat (messages)
  • Microblog (and replies)
  • Wall post (and comments)
  • Forum topic (and answers or replies); also named as Group, Discussion, Question
  • Blog (and comments)
  • Article (and comments)
You can’t perform that action at this time.