So you have multiple screens under Xfce and want to have one task bar on each screen, only showing applications on that screen. Here you go: Create one panel for...

...by going to Right click / Panel / Panel preferences... and uncheck "Lock panel". You now see a grip that you can use to drag one panel to the bottom of each...

...bar or bookmark). You will no longer get the website's favicon as a shortcut icon, but there are many great icons here: /usr/share/Icons/$YOUR_DESKTOP_THEME$/128/actions

makandra dev
github.com

Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and supports a ton of features like graphs. API looks mature...

...and existing code is easy to migrate when coming from the spreadsheet gem. The documentation of some methods is a bit out of date, but you'll find your way...

Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2: controller.class.filter_chain.map(&:method) Note that we need to look at the...

...controller's class since before_filter and after_filter stuff happens on the class level. Also mind that the above code will give you all filters, both those run before...

makandra dev

This describes how to migrate an existing cucumber test suite to Spreewald. Add the gem Include spreewald into your cucumber environment by putting require 'spreewald/web_steps' require 'spreewald/email_steps' # ... or just

...spreewald/all_steps' into your support/env.rb. Look through your step definitions for everything that might be included in Spreewald. Candidates are web_steps, shared_steps, table_steps, email_steps etc. Comment it...

.../var/swapfile]: Could not evaluate: Field 'device' is required Notice: Finished catalog run in 12.39 seconds it's possible there is a "problem" in your /etc/fstab. I could fix it with...

...I needed it to do drag'n'drop in a hierarchical tree. Let's say you have this $scope in your Angular controller: $scope.tasks = [ { 'text': 'Task 1' }, { 'text': 'Task...

...renders this HTML: Task 1 Task 2 If you'd like to access the scope bound to the second you can say this in jQuery: var li = $('li:eq...

Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors as they occur: Update gems as listed below, and bundle...

...Boot a Rails console - see below for a list of changes you will probably need Run Specs with --backtrace option Run Cucumber features (with Geordi's --debug option)

The adjust-hue function of Sass allows you to change a color's hue, but only relative to its current hue. adjust-hue(#ffff00, 120) // => #00ffff

...to a hue of 120° which is a nice shiny green? Take this function: @function set-hue($color, $target-hue) $current-hue: hue($color) $degrees: $target-hue - $current-hue

Restangular can make use of $http's built-in response cache. # Cache response for single request Restangular.one('accounts', 123).withHttpConfig({ cache: true }).get(); # Cache responses for all requests (be careful...

...with that, you might work with stale data) RestangularProvider.setDefaultHttpFields({ cache: true }); To invalidate cached responses e.g. on a state change in UI Router, you can do @app.run ['$rootScope', '$cacheFactory', ($rootScope...

So you're getting an error message like the following, although your Gemfile lists shoulda-matchers and it has always worked: NoMethodError: undefined method `allow_value' for #

...to Rails 4.1 (specifically, Spring) revealing a weak point of shoulda-matchers -- jonleighton explains why. Solution The solution is to follow the gem's installation guide: # Gemfile gem 'shoulda-matchers...

jetbrains.com

Note that you can also go "up", to the controller, using a similiar icon in the first line of a view...

Do not use .rvmrc files to specify Ruby version and gemset configuration any longer, it's deprecated and not considered by other Ruby version managers such as rbenv.

...migrate an existing .rvmrc you can use rvm rvmrc to .ruby-version. Put gemset specification into .ruby-gemset. Creating the .ruby-version file on your own, just make a file...

...an OpenStack instance: # nova resize example 23 --poll ERROR: Resize requires a change in size. (HTTP 400) You need to change your flavor to have a different memory size. It...

Do it like this: attribute :active, Virtus::Attribute::Boolean Long story In Virtus you define attribute with their type like this: attribute :name, String attribute :birthday, Date

...only TrueClass and FalseClass), so use Virtus::Attribute::Boolean instead. The reason while Boolean sometimes survives compilation is that many libraries define a global Boolean class for some reason. That...

The usage shares of your site highly depends on your target audience. E.g. no Internet Explorer has ever seen hollyapp.com, but that's because of its tech-savvy audience. Distribution...

...will also differ by other factors, such as region. See this Wikipedia article for details. If you don't know your audience, you can use the stats of tracking tools...

When some of your Google contacts are no longer synchronized with your e-mail client or mobile phone, those contacts are not in a group "My Contacts". Google only syncs...

...contacts in that group. In order to fix this: Open Google Contacts Select all contacts (there's a link) Press "Move to My Contacts" Note that when you are using...

Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is as described in Solution 1. When doing integration testing with...

...cucumber and selenium you will often encounter problems with timing - For example if your test runs faster than your application, html elements may not yet be visible when the test...

makandracards.com

Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to reproduce the issue: Example 1 # bad code (Time.current .. Time.current + 1.hour...

...include?(Time.current) # Use Range#cover? instead of Range#include? since the former does no typecasting into integers. (Time.current .. Time.current + 1.hour).cover?(Time.current) Example 2 # bad code Post.where(:created_at => min_date.beginning...

...Add to ckeditor/config.js CKEDITOR.editorConfig = function(config) { config.contentsCss = [ '/assets/myCkeditorStyles.css', // any other file to encapsulate custom styles '/assets/myFontFaceTags.css' ]; } It's not enough to provide the font face tags within your public folder...

...call it within the ckeditor/config.js. You also might be interested in CKEditor asset pipline support...

Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of about 5px between the lower edge of the image and...

...the containing div, although there are no paddings or margins set, and there's no whitespace. The reason is, the image will vertically align baseline, and the space below the...

...To fix this error upgrade your project's ruby version or install the last supported version of Bundler for Ruby < 2.3: gem install bundler -v '~>1' You will also see...

guides.rubyonrails.org

Starting from 4.1, Rails automatically detects the inverse of an association, based on heuristics. Unfortunately, it does not seem to notify you when it fails to infer the :inverse_of...

...so you are better off to always manually set :inverse_of anyway. Note that automatic inverse detection only works on has_many, has_one, belongs_to associations. Extra options on...

github.com

...version to be compatible with Rails 2 was 0.8.6: While there are 1.8/1.9 switches in the original code, one essential fix for Ruby 1.9's API change of Module.const...

...defined? was missing. [2] Changes for replica sets were reverted (since their tests were not passing) and some tests were fixed...