- 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:
Bundler 1.1 has been released. With this version you no longer need to wait for this:
Fetching source index…
The new Bundler is smarter and can fetch required metadata in a few seconds.
You can install the new version by saying:
sudo gem install bundler
This article shows how to create a Sass mixin for a colored button. The button's foreground color is dynamically chosen between either black or white, depending on the given background color.
It's a nice intro into
@else conditionals in Sass.
This only applies to RSpec below version 1.3.2. The issue has been fixed in RSpec 1.3.2, and most likely RSpec 2 and later versions.
When you have a helper that calls
content_for and want to check its behavior you should probably write a feature instead. If you still want to do it, mind the following.
Consider this helper:
module LayoutHelper def title(string) content_for :title, string string end end
Somewhere in the layout we'd then say something like this: `<%= yield :title %...
> Quoted text
Here is [a link](http://makandra.com/).
Here is a link.
![An image; this is the alt text](http://www.makandra.co…
Let's say you need to revert a migration that happened a while back. You'd create a new migration that removes what was added back then in the
up path, while its
down path restores the old functionality.
While you could just copy&paste the
up parts of it to the inverse part of the new migration, you may not want to do that. Especially when the up/down paths already contained some logic (that executed
update statements on the created column, for example), copying does not feel right.
Someone already added the logic how to…
If you get this:
Installing typhoeus (0.3.3) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /usr/bin/ruby1.8 extconf.rb checking for curl/curl.h in /opt/local/include,/opt/local/include/curl,/usr/include/curl,/usr/include,/usr/include/curl,/usr/local/include/curl... no need libcurl
You can fix it by installing the
sudo apt-get install libcurl3-dev
Now you should…
If you want to know your public key's fingerprint, do this:
ssh-keygen -lf ~/.ssh/my.key.pub
This may be necessary to authenticate your key on GitHub because of recent events – you need to do that if you get an error like this when talking to them (to pull etc):
ERROR: Hi foobear, it's GitHub. We're doing an SSH key audit.
Please visit https://github.com/settings/ssh/audit/…
to approve this key so we know it's safe.
Under Settings / Appearance you can uncheck a box Animate windows. This will change your life.
Let's say you have two XML strings that are ordered differently but you don't care about the order of attributes inside containers:
a = '<?xml version="1.0" encoding="UTF-8"?><Authenticate><User>batman</User><Password>secret</Password></Authenticate>' b = '<?xml version="1.0" encoding="UTF-8"?><Authenticate><Password>secret</Password><User>batman</User></Authenticate>'
Working with plain string comparison is not helpful, of course:
a == b => false
Instead, you can use the Nori gem …
Undeterministically I got a
nil error on saving the object caused by the random order of hash elements of the params hash.
class Feedback belongs_to :user def role=(value) @role = value self.email = find_email_by_name(user.name) end end
This piece of code works well until the object params hash contains a second element when it is updated like this:
Now it is no longer ensured that
user was set before
name was set. If the name…
You are looking for a functionality in RubyMine but don't know or remember its keyboard shortcut or which menu it is located in?\
This will bring up the "Find Action" box where you can enter an action's name or category. Pick the result from the list to run it.
The list of results will also show you any assigned keyboard shortcuts.
Online tool to test how a site behaves in popular desktop, tablet and phone resolutions.
- Your current
rubymust be Ruby Enterprise.
gem install passenger
- Edit your
httpd.confaccording to the instructions provided at the end of the setup script.
- Restart Apache:
sudo service apache2 restart
This also works when you previously ran your Passenger using MRI. Just run the setup as described.
When trying to install the gherkin gem, you might well encounter an error saying:
cc1: warnings being treated as errors
If upgrading is not an option (corresponding issue on github), you can install it properly by changing the compiler flags as follows:
gem install gherkin -v '2.2.9' -- --with-cflags=-w
If you cannot install the specific version you intent to, try uninstalling the gem first.
To install the gem with bundler you can to do this:
bundle config build.gherkin...
When branches get deleted on
origin, your local repository won't take notice of that.
You'll still have your locally cached versions of those branches (which is actually good) but
git branch -a will still list them as remote branches.
You can clean up that information locally like this:
git remote prune origin
Your local copies of deleted branches are not removed by this.
The same effect is achieved by using (kudos to Julien):
git fetch --prune
You could also set that as a default.
Solutions look and feel the same…
RubyMine offers you to exclude directories from search, meaning faster search results and less "noise" in the list of result.
Right-click a folder in your project tree and click "Mark Directory As" → "Excluded".
Do it for your your log, data, and other directories that you don't need to access during development and whose search results are irrelevant.
They won't be deleted but simply ignored when searching across a project's files.