Skip to content

Instantly share code, notes, and snippets.

View onemanstartup's full-sized avatar
👋

Dmitriy Plekhanov onemanstartup

👋
View GitHub Profile
<fb:like href="http://techcrunch.com/2013/12/23/camera360-one-of-chinas-most-popular-photo-apps-now-focusing-on-international-growth/?ncid=facebook_social_share" layout="button_count" send="false" show_faces="false" fb-xfbml-state="rendered" class="fb_edge_widget_with_comment fb_iframe_widget"><span style="height: 20px; width: 76px;"><iframe id="f20d3dfb98" name="f2af435d44" scrolling="no" title="Like this content on Facebook." class="fb_ltr" src="http://www.facebook.com/plugins/like.php?api_key=&amp;channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D28%23cb%3Df351a0afc%26domain%3Dtechcrunch.com%26origin%3Dhttp%253A%252F%252Ftechcrunch.com%252Ff3ca7371fc%26relation%3Dparent.parent&amp;colorscheme=light&amp;extended_social_context=false&amp;href=http%3A%2F%2Ftechcrunch.com%2F2013%2F12%2F23%2Fcamera360-one-of-chinas-most-popular-photo-apps-now-focusing-on-international-growth%2F%3Fncid%3Dfacebook_social_share&amp;layout=button_count&amp;locale=en_US&amp;node_type=link&amp;sdk
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
[
["Кармин","960018"],
["Кардинал","c41e3a"],
["Тициановый","d53e07"],
["Красный","ff0000"],
["Алый","ff2400"],
["Карминово-красный","ff0033"],
["Киноварь","ff4d00"],
["Международный оранжевый","ff4f00"],
["Ализариновый","e32636"],
@onemanstartup
onemanstartup / README.md
Last active December 22, 2015 04:59 — forked from ankane/README.md

Benchmark Bundler

Because loading gems can take longer than you think

$ curl -fsSL https://gist.github.com/raw/5022636/benchmark.rb | ruby
............................................................[DONE]

Gem                            Time(sec)     Pct %
--------------------------------------------------
@onemanstartup
onemanstartup / enums.md
Created August 25, 2013 15:55
Everything about enums in ruby and rubyonrails from different places

Have a legacy database and need some enumerations in your models to match those stupid '4 rows/2 columns' tables with foreign keys and stop doing joins just to fetch a simple description? Or maybe use some integers instead of strings as the code for each value of your enumerations?

455/41/rails 4, activeadmin/2 days ago

I18n and ActiveRecord/Mongoid/MongoMapper rspec, helpers, activeadmin

  • Default Value
  • Formtastic support
  • Select Form Helpers
  • l18n
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@onemanstartup
onemanstartup / fusion.thor
Created February 11, 2013 11:00
templating in thor
# Default Middleman template
class Fusion < Thor::Group
include Thor::Actions
argument :location, :type => :string
class_option "css_dir",
:default => "css",
:desc => 'The path to the css files'
class_option "js_dir",
# Этот .htaccess поможет сделать ваш сайт быстрей.
# Пользуйтесь на здоровье себе и вашему сайту.
# Автор: Алекснадр Белов aka alex Roosso
# Сайт: http://www.black-web.ru
# ICQ: 3405729
Options All -ExecCGI -Indexes -Includes +FollowSymLinks
#Options -MultiViews
# REWRITE ___________________
@onemanstartup
onemanstartup / landing_page_checkilist
Created December 12, 2012 01:18
A 50-Point Checklist For Creating The Ultimate Landing Page from http://unbounce.com/landing-pages/checklist/
Does your landing page headline match the message on your ads?
Is your landing page messaging focused on a single purpose?
Could a stranger understand the purpose in 5-10 seconds? (test this)
Is it clear who your company is and what you do? (a logo and tagline)?
Do you have a simple secondary description to enhance the headline?
Do you use bullet points to describe the benefits of your product/service?
Are you using a relevant and original main image or video that shows it being used (context of use)?
Does your page message have the clarity of a 30-second elevator pitch? (Read out your page copy to someone and see if they understand it.)
Is your primary headline phrased to answer the question “What is this page about?”
Have you removed extraneous links (like the global nav) – to remove page leaks?