The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node. Below you can find such a list. It's all...

...credit goes to the Capybara committers. When you talk to Capybara from a Cucumber step definition, you always have page as the document root node, or whatever you scoped to...

makandra dev
serverfault.com

...can create a huge amount of data. This can be both: too much data size on HDD and tiring to analyze. You can run a script in a screen which...

...checks out the packages transfered per second and start a tcpdump when the packages exceed a fixed number. #!/usr/bin/env bash interface=eth0 dumpdir=/tmp/ packet_threshold=5000

makandra dev
github.com

SitePrism gives you a simple, clean and semantic DSL for describing your site using the Page Object Model pattern, for use with Capybara in automated acceptance testing. The Page Object...

...Model is a test automation pattern that aims to create an abstraction of your site's user interface that can be used in tests. The most common way to do...

...virtual machines for different Internet Explorer versions. The images are available for various virtualization solutions, including VirtualBox. BrowserStack For a monthly fee browserstack.com provides access to various versions of Windows...

makandra dev
github.com

Improve geordi cucumber: Only attempt @solo run when the specified files contain the @solo tag, skip @solo run if any filename is passed with a line number (e.g. features/example.feature...

Improve geordi deploy: Find stages by their prefix (e.g. s -> staging, m -> makandra), bundle if needed, check the selected stage exists Improve geordi server: Takes port as argument (e.g. geordi...

The very useful andand gem does not play very nice with Ruby's SimpleDelegator (or vice versa). This following will not work: class MyDecorator < SimpleDelegator def foo end end MyDecorator.new...

...Object.new).andand.foo The reasons are a bit subtle, basically SimpleDelegator will "force" some methods to be delegated, so the andand method is called on the wrapped object, not the delegator...

...back panel and a headset connected to the front panel. I used to play sound over both outputs, but this suddenly stopped working this week. Apparently, (perhaps through some update...

...jack sensing" got turned on, which disables the back panel as soon as you connect something to your front panel audio jack. To disable this feature, I used alsamixer (use...

yoyo.io

...easy to retrieve variants of a given icon. The format is: fa-[name]-[alt]-[shape]-[o]-[direction] Note that this is a naming convention which doesn't imply there's...

...combination of tags. name The name of the icon, e.g. comment, print, bookmark etc. See the full list. alt An alternative icon. shape The icon inside a circle or square...

Consider you have a file that uses improper encoding on special characters. Example: You see the latin1 version "ñ" for the UTF-8 "ñ" but the file itself is stored...

...Now you tell vim that the file's encoding is actually latin1 (you can see what Vim is currently using by saying only :set fileencoding): :set fileencoding=latin1

Let's say you have commits that change a file (and looking at the commit details show you the changes, etc). Now, when you do a git log you see...

...them, but when you say git log that.file these commits don't show up? This is for you. The reason is that the file got deleted deleted/re-added/renamed (any or all...

If you encounter a Firefox that does not care about your font settings but always uses specific fonts, you can fix that. Usually this should not happen, as it's...

...not a default setting: Open up the Preferences. Switch to "Content". In the "Fonts & Colors" section, click the "Advanced..." button. Tick "Allow pages to choose their own fonts, instead of...

...ActiveRecord::RecordNotSaved error, a method inside one of your model's callback chains (before_save etc) possibly returned false. This commonly happens when you have a method setting attributes and...

...the last one is a boolean set to false (as the value of the last statement is returned). Fix this by simply calling true at the end of such methods...

developer.mozilla.org

Having your site run on SSL is worthless when you include content over an unsafe connection (HTTP). Here is how to hunt down mixed content with Firefox.

...on pages (mine did not), you can enable it again: Visit about:config and search for security.warn_viewing_mixed. If it's set to false, set it back to true...

Every time I started RubyMine, it opened the main window on the left monitor -- when moving it to the center monitor and closing it, the next time it still opened...

...up on the left one. Here is how I forced RubyMine to start up on a different screen: Un-maximize the main window Move it to your preferred monitor

...jd) which makes your code blow up when you use it together with the Spreadsheet gem. A solution is to restore the Ruby implementation of this particular method. To do...

...hard on yourself. You need to give it a height and change the box-sizing and display: button input[type="reset"], input[type="button"], input[type="submit"], input[type="file...

...input[type="button"] display: inline-block box-sizing: border-box height: 20px line-height: 20px Also see Proper cross-browser CSS styling for buttons...

Since there are more and more touch-capable devices out there, as a web-developer it becomes more and more important to know how to deal with touch events next...

...MAX functions are for aggregations only. This will not work and produce an error: SELECT id, MIN(birthday, '1978-01-01') FROM users; In order to compute the minimum or...

...maximum value for the current row, use LEAST and GREATEST instead: SELECT id, LEAST(birthday, '1978-01-01') FROM users...

bugs.launchpad.net

Terminator has a cool feature that allows you to split your terminal into many panels and type in all of them at the same time. It's called broadcasting and...

...and could be very dangerous (e.g. if you're logged in to a production server in a terminal that is on another workspace). To prevent the broadcast from affecting other...

Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request URL, which can lead to errors when you have absolute...

...URLs in your Cucumber tests. If you really need to use absolute URLs somewhere, say in an email you send, either throw away the host when parsing it (e.g. body.scan...

Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify the option's value, not its text. = form.select :country, Address.countries...

...for_select, :include_blank => true, :disabled => ['disabled-value1', 'disabled-value-2'] Also see Cucumber: Check if a select field contains a disabled option on how to test this...

...responds to a given format, here is how you do it: Rails 3 match 'sitemap.xml' => 'feeds#sitemap', :constraints => { :format => 'xml' }, :as => 'sitemap' Rails 2 map.sitemap 'sitemap.xml', :controller => 'feeds', :action => 'sitemap...

...you get this Ruby hash: { true: 'Totally', false: 'Nope' } In order to use the strings 'yes' and 'no' as keys, you need to wrap them with quotes: 'yes': 'Totally'

...true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF

explainshell.com

Enter any command into explainshell and it will explain it to you: split into separate commands (if present), with each option explained. About Hello, This site contains 29761 parsed manpages...

...from sections 1 and 8 found in Ubuntu's manpage repository. A lot of heuristics were used to extract the arguments of each program, and there are errors here and...