A few releases back, Chrome started using a Material Design UI on desktop. If you don't like it (on some window managers or GTK themes it's ugly), you can disable it.
F) for "Material Design"
Chrome's default theme should now be pretty again.
In this article, we’ll look at what side effects are, why they are problematic despite being necessary, and how to isolate them to minimise their drawbacks.
Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.
Maybe this flowchart may be of help…
The Edge Rider gem allows you to collect an array of values for one field of your ActiveRecord elements:
>> User.active.collect_column(:id) => [1, 5, 23, 42]
It also comes with a
:distinct option in case you are only interested in unique values:
>> Article.collect_column(:state, distinct: true) => ['draft', 'published']
In modern Railses (since 3.2) you can also use ActiveRecord's
Capistrano is by default configured to exclude the gems of the groups
test when deploying to the stages
staging. Whenever you create custom groups in your
Gemfile, make sure to exclude these, if they should not be deployed to the servers. The gems of these groups might not be loaded by rails, however, the deployment process will take longer as the gems will be downloaded and installed to the server.
e.g. to exclude the groups
deploy, add the following to `config/deploy/production.rb…
Sometimes you might need to nest a git-project inside another git-project. The right strategy is to use submodules in this case.
Here is how you add a nested project inside your parent project
$ git submodule add <nested-repository-url>
git status will now show you the following:
new file: .gitmodules new file: nested_project
nested_project will point to the specific git commit of the nested project.
New team members can check out the the parent project and th…
Similar to our snippet that runs all Cucumber features matching a given string, the following will run all modified or new Cucumber features by looking at your git status:
git status --short | grep -v '^ D ' | grep '.feature' | sed 's/.. //' | tr '\n' ' ' | xargs geordi cucumber
If you want to know what each of the above commands does, see [explainshell](http://explainshell.com/explain?cmd=git+status+–short+%7C+grep+-v+%27%5E+D+%27+%7C+grep+%27.feature%27+%7C+sed+%27s%2F..+%2F%2F%27+%7C+tr+%27%5Cn%27+%27+%27+%7C…
We have a new gem Minidusen which extracts Dusen's query parsing and
LIKE query functionality.
Minidusen can no longer index text in MySQL FULLTEXT columns, which was hardly used and didn't always help performance due to the cost of reindexing.
Minidusen is currently compatible with MySQL, PostgreSQL, Rails 3.2, Rails 4.2 and Rails 5.0.
Our example will be a simple address book:
class Contact < ActiveRecord::Base
validates_presence_of :name, :street, :city, :e…
Unfortunately, it is no longer maintained.
You know those helper methods that just render some HTML but look weird because of
content_tags all over the place? You could also use Haml instead.
Consider the following helper.
def greeting message = ''.html_safe message << 'Welcome to ' message << content_tag(:span, Rails.env, class: 'greeting--location') content_tag :div, message, class: 'greeting' end
That looks clumsy and is hard to read.
Wouldn't it be nicer to say something like this?
def greeting render_haml <<-HAML ...
If you were using Dusen for its query parsing and LIKE queries, we recommend to migrate to Minidusen, which extracts those parts from Dusen. Minidusen is compatible with MySQL, PostgreSQL and Rails 3.2, 4.2 and 5.0.
If you are looking for a full text indexing solution, we recommend to use PostgreSQL with pg_search.
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.
geordi deploy: Find stages by their prefix (e.g.
m-> makandra), bundle if needed, check the selected stage exists
geordi server: Takes port as argument (e.g.
geordi ser 3001), option
-P) starts the server with
-b 0.0.0.0to make it accessible from other machines in the local network, e.g. …
Reverting a commit means creating a new commit that undoes the old changes.
git revert commit_sha1
Unfortunately, you do not want parallel_tests to use your Spring binstubs as those parallelized tests will share data and/or loose some information. There are some issues about this on GitHub and there is a suggested [workaround](https:…
SVG files are often much larger than necessary, containing comments, metadata, hidden elements etc.
Optimize them with this tool.