...you upgraded it everywhere. But because it's FreeBSD it does not restart running services. After every old version is removed from /var/cache/pkg you restarted collectd and it does not...

...start anymore, you really want to downgrade to 5.8.1 again. But even pkg now has 5.9.0 and you need your own make config setup anyway. portdowngrade Enter portdowngrade. Install it...

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows us to use ES6 modules and npm packages (through Yarn...

...does for JavaScript roughly what Bundler does for Ruby. Read the first couple of sections of its official documentation. You should learn how to: Install and update packages Remove packages...

...you want to manually check if e-mail delivery works on a machine by sending an e-mail you can run the following: mail -s Test someone@example.com < /dev/null

...send an empty e-mail with "Test" as its subject to someone@example.com. If you want it to contain a message body, call mail -s Test someone@example.com only; the mail application...

askubuntu.com

Adobe no longer supports their PDF reader on Linux and the official page does not offer it for download. \ However, some files may not display properly on Ubuntu's default...

...PDF reader Evince or PDF forms may not work as expected. Hence, you may still need to use it. Here is how to install the Adobe Reader (acroread) if you...

Note that we used $ and ^ to explicitly look at the end and start of the filenames...

...git pull won't know its remote version. You could use difficult commands to set up a branch's tracking but it's easier to...

...just push it like this: git push -u From the documentation on git push: -u, --set-upstream For every branch that is up to date or successfully pushed, add upstream...

kukicola.io

Using ActiveRecord's #signed_id and .find_signed methods you can create URLs that expire after some time. No conditionals or additional database columns required...

makandra dev
tom.preston-werner.com

A perfect implementation of the wrong specification is worthless. By the same principle a beautifully crafted library with no documentation is also damn near worthless. If your software solves the...

...wrong problem or nobody can figure out how to use it, there's something very bad going on. Fine. So how do we solve this problem? It's easier than...

makandra dev

...Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside scope: (function() { var foo = "value"; // foo is scoped to this IIFE })(); In Coffeescript an IIFE looks...

(-> foo = "value" # foo is scoped to this IIFE )() There is also a shorthand syntax with do: do -> foo = "value" # foo is scoped to this IIFE

Here's a pretty useful steps that hasn't made it into Spreewald yet. It is best used with the auto-mapper for BEM classes in features/support/selectors.rb

...above [selector] element When /^I hover above (.*) element$/ do |selector| page.find(selector_for(selector)).hover end Example: When I hover above the album's image element → triggers a hover event...

stackoverflow.blog

...format ("2021-02-22T20:34:53.686Z") Google API guideline: https://google.aip.dev/ Numbers: String vs. Number The JSON number type is not a double. It's just a number...

...parsed as whatever the parser finds fitting. Pagination: Limit + Offset vs. Object ID / Pointer vs. System-Version Tables Filter Attributes e.g. ?fields=f1,f2,f3 Version in path (/api/v1/) or...

When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm

...binary, do not install Ubuntu's node package. Instead, you need to create a symlink that points to the binary one of the nodejs package: sudo ln -s /usr/bin/nodejs /usr/bin/node...

...You probably already installed NodeJS. In case you did not: sudo apt-get install nodejs If you already installed the node Ubuntu package, bower will just do nothing (i.e. not...

...disable hiding URL parameters, open up Tools → Preferences (Ctrl+F12) → Advanced → Browsing and check "Show full web address in address field". No need to touch opera:config. The badge that...

...displays the page's "zone" (Web, Secure, Opera, ...) will be shrinked so you can still see a yellow lock for proper SSL connections, etc...

...with more than one developer should always consider to enforce code review even for small changes to improves the overall code health of the system. Here are some guidelines that...

...perfect pull request Google Google's Engineering Practices documentation Modern Code Review: A Case Study at Google Thoughtbot Thoughtbot' Code Review Guideline

In large forms (30+ controls) new Capybara version become [extremely slow] when filling out fields. It takes several seconds per input. The reason for this is that Capybara generates a...

...huge slow XPath expression to find the field. The attached code patches fill_in with a much faster implementation. It's a dirty fix and probably does a lot less...

...model inherits from others or uses many concerns / traits, it might be hard to see in the code which validators it has. But fortunately there's a method for that...

...UniquenessValidator:0x00007f55f1417e88 @attributes=[:name], @klass=UserGroup (call 'UserGroup.connection' to establish a connection), @options={:case_sensitive=>true, :scope=>:partner_id}>, #<ActiveModel::Validations::NumericalityValidator:0x00007f55f1415200 @attributes=[:user_count_limit], @options={:greater_than...

askubuntu.com

I was annoyed that RubyMine's autocompletion did not work via Ctrl+Space for me. In fact, it did not work in any application. Turns out that keyboard combination was...

...hijacked by Ubuntu as it's the default for switching input languages (i.e. keyboard layouts). If you use only 1 language/layout, you will not notice except for the key not...

There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once however is error-prone since each cell is transformed to...

...formatted but empty cells. As of today, I found two promising alternatives that provide a stream-based access to spradsheet rows: Roo supports multiple spreadsheet types like ODS or CSV...

Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested. Integrating this in a rails project with rspec, cucumber and...

Add it to your Gemfile and bundle group :test do gem 'simplecov', require: false end Add a .simplecov file in your project root: SimpleCov.start 'rails' do

You must reconfigure the guest so it will get its own IP address: Shutdown the guest In the guest's VirtualBox settings, choose Network and switch the network adapter type...

...Unix) or ipconfig (Windows) You can now connect to this IP address using HTTP, SSH, etc. Note that by doing this your VirtualBox guest is fully exposed on the local...

askubuntu.com

...not play nice with gnome-open. You can fix the problem by uninstalling it: sudo apt-get remove exo-utils Note that this may also uninstall XFCE tools like xfce4...

To reduce download time, application servers usually serve content using gzip compression, if the browser supports it. When using a tool like Wget to explicitly download an application's response...

...the server responds with the uncompressed version: wget http://example.com/ If you are curious about the compressed file's size, pass the corresponding HTTP header: wget --header="accept-encoding: gzip...

...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 ~/.ssh/id_rsa [default] the very same key you used for connecting to the application server - forwarded automatically to the git repository.