- Search for repeating cards with
- Search for unfinished cards with
- Search for cards in a certain topic with
- Search for phrases with
- Exclude a word from search:
- Exclude a phrase from search:
- Exclude a topic from search:
TeamViewer 6 and lower had an issue where they would see a multi-monitor Linux setup as a single wall of pixels. This is fixed in version 7. The guest can now select the currently active screen from the TeamViewer menu.
The handy method
has_select?(field, :selected => text) does not behave as expected with Cucumber 0.10.2, Capybara 0.4.1.2 and Selenium 0.2.2. It may not recognize a select field if the selected
option with the
text has no value. If you don't have the possibility to upgrade these Gems, probably the best way to go is to distinguish the current Capybara driver:
Then /^"([^"])" should be selected for "([^"])"(?: within "([^"]*)")?$/ do |value, field, selector|
# currently needed due to different behav...
You can change the color for text selection via CSS, using the
Adding this to your Sass will make all text selections use a red background:
::selection background-color: #f00 ::-moz-selection background-color: #f00
Unfortunately, those can't be combined into "
::selection, ::-moz-selection". Doing so will have no effect.
Don't you just hate to write Cucumber path helpers to be able to say this?
When I go to the user form for "firstname.lastname@example.org" # goes to edit_user_path(User.find_by_anything!('email@example.com'))
When I go to the form for the user "firstname.lastname@example.org" # goes to edit_user_path(User.find_by_anything!('email@example.com'))
When I go to the form for the user above" # goes to edit_user_path(User.last)
When I go to the project page for "World Domination" # goes to project_path(Project.find_by_anything!('World Domination') …
We've made it easier to link other cards:
- You can now find a button Cite other card above the main text area
- Clicking this button lets you search for another card
- Clicking on a search result will paste a Markdown link into the text area
will_paginate triggers a database query to determine the total number of entries (i.e. to let you display the number of search results). When you paginate complex scope (e.g. that has many
includes), this query may take several seconds to complete.
If you encounter this behavior, a solution is to calculate the total count yourself and pass it to the pagination call:
scope = User.complex_scope_full_of_includes total_number_of_users = scope.count @users = scope.paginate(:total_entr...
The .ova file format is a tar file with a .ovf file inside.
tar xvf virtualboximage.ova
You probably know about the possibility to tag scenarios in Cucumber to run your own piece of code before the actual scenario is run which looks like that:
@foo Scenario: Do something ...
and you place the following snippet into
Before('@foo') do puts "This is run every time a @foo tagged scenario is hit" end
You can tag RSpec examples like this:
it 'does something', :foo => true do ... end
What you need is the following within the
RSpec.configure do |config| block wit…
REST Client is a nice, simple HTTP client library for Ruby.
When you do a simple GET request like that:
it will result in this request beeing sent to www.example.com:
GET / HTTP/1.1 Accept: */*; q=0.5, application/xml Accept-Encoding: gzip, deflate Host: www.example.com
application/xml accept header might lead to unexpected results on your server. You can force REST Client to ask the server for default
text/html that way:
You can now add code blocks without indentation, by using triple-backticks:
``` Code block goes here. ```
We experienced problems with Sunspot and Solr on Tomcat: Umlauts (ä, ö, ü) were not correctly handled on Tomcat while everything was okay on the local development machines (your local Sunspot service you start with the
sunspot:solr:run task is based on Jetty).
We use a stemmer that reduces "Sänger" to "sang" and "Sanger" to "sang" as well.
Though, results for "Sänger" where empty on Tomcat.
This is due to a UTF-8 bug in RSolr (see Github for some discussion on that).
The bug is fixed in a …
Consider these classes:
class Topic < ActiveRecord::Base def title "A title" end def category "Topic category" end end class Post < ActiveRecord::Base belongs_to :topic def_delegato...
When your gems complain about invalid gemspecs and illformed requirements, it is most probably an error resulting from the transition from
psych. To fix this:
- go to your gemspec directory (e.g.
=(equals sign) in each file that's complaining
Preview email in the browser instead of sending it.
Copy the attached file to
config/initializers/indent_string.rb and you can say
"foo".indent(4) # " foo"
Note you will find many simpler implementations of this method on the Interweb. They probably won't do what you want in edge cases, fuck up trailing whitespace, etc. The implementation in this card has the following behavior:
describe '#indent' do it 'should indent the string by the given number of spaces' do "foo".indent(2).should == " foo" end it 'should indent multiple lines line by line' do ...
When deploying code with Capistrano (depending on your configuration) at some point Capistrano tries to check out code from your repository. In order to do so, Capistrano connects to your repository server from the application server you're deploying to with SSH. For this connection you can use two SSH keys:
- the user's
- the very same key you used for connecting to the application server - forwarded automatically to the git repository.
If you prefer the second way, add this to deploy.rb: