...consider processing your images with libvips instead of ImageMagick. Reasons for libvips There are several upsides to using libvips over ImageMagick: libvips is considerably faster and uses less memory.
...has a large attack surface that has repeatedly caused security incidents in the past (compare ImageMagick CVEs with libvips CVEs). Ubuntu is sometimes slow to fix the numerous ImageMagick vulnerabilities...
To force a check on your next reboot (here for your root partition), simply: touch /forcefsck To manually do this, here is how to do it for the first partition...
...on sda, when you are using ext4: fsck.ext4 -fn /dev/sda1 -f forces the check, even if everything seems okay. -n is a "read only" check, where nothing is changed and...
Bash stores the exitcodestatus of piped commands in the environment variable PIPESTATUS So you can just echo ${PIPESTATUS[@]} to get them all. 13:52:30 ✔ claus:~$ ps ax | grep /usr/bin/ruby...
...PIPESTATUS is an array, so you can get the exitcode of an specific command (first pipe): 13:54:20 ✔ claus:~$ echo ${PIPESTATUS...
...warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated. Specify all the necessary parameters instead. that is for example caused by url_for( :overwrite_params...
...link_to uses url_for internally, so you can can use params.merge {...
...} as the second parameter of link_to...
We use Selenium WebDriver with Capybara for end-to-end tests that need a real browser. Important Work on this lesson in advisor mode. Learning goals You can explain how...
...the source you read in the exercise 📄 The two drivers as gems: rack-test and selenium-webdriver Flaky tests and our toolbox 📄 Fixing flaky E2E tests — our card on why...
Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit buttons like "accept" or "reject". Such buttons usually attempt...
...a state transition while updating the record. To process a form with multiple buttons, your server-side code will need to know which button was pressed. To do so you...
Stepping forward from JavaScript Basics, the goal of this card is for you to be able to read and write more complex ES6+ code. Important Work on this lesson in...
...explain JavaScript's object model — objects, prototypes and the prototype chain — and how class syntax maps onto it. You can explain what a module is and structure code with import/export...
Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to be the new directory, do it like this:
.../var/lib/mysql /mnt/ Open your MySQL configuration (sudo vim /etc/mysql/my.cnf) and change the datadir value to your new path (e.g. /mnt/mysql) Modify your AppArmor configuration: sudo vim /etc/apparmor.d/usr.sbin.mysqld Change/copy the lines...
...you are done and all is well: remember to remove those entries again, or set the log level to 0, to switch off rewrite logging...
...clean and are easy to use. This lesson covers the basics of color, typography, spacing and visual hierarchy. Important Work on this lesson in builder mode. Learning goals
...explain the principles that make an interface look clean: visual hierarchy, consistent spacing, alignment, restrained color and readable typography. You can choose a small color palette and use contrast deliberately...
View specs are a powerful tool to test several rendering paths by their cases instead of using a more costing feature spec. This is especially useful because they become quite...
...used with Capybara::Node::Finders and Capybara::RSpecMatchers. This allows to wirte view unit specs as you can isolate specific parts of the rendered view and then use readable and...
...However, you need to be aware of the overall transaction nesting constellation, because creating proper sub-transactions can lead to unwanted or too early triggering of after_commit callbacks:
...project> Country.first.name # => "Afghanistan will not change" Wait. What happened to the rollback in the after_save-callback? From the Rails docs: Transaction calls can be nested. By default, this makes...
This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate| select = find_field(label) options = select.all('option').reject { |o| o.value.nil? } options.collect...
...this custom matcher, the each_cons block can be replaced with: options.should be_naturally_sorted Usage Then the "Organizations" select should be sorted Depends on Capybara. This step is now...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking") API print('script start') html = get('/foo') print(html)
Script outputs 'script start', (long delay), '...
...', 'script end'. Talking to asynchronous (or "evented") API print('script start') get('foo', done: function(html) { print(html) }) print('script end')
CSS controls how your HTML looks. This lesson covers selectors, the box model, basic layout, the browser's inspector, and the Sass basics we use in all projects. Important
...this lesson in teacher mode. Learning goals You can explain how the cascade and specificity decide which CSS rule applies to an element. You can explain the box model and...
Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet devices, number fields show a special virtual keyboard that shows...
...mostly digit buttons. Decimal values will be formatted using the user's language settings. For example, German users will see 1,23 for . Values in the JavaScript API or when...
Some of the people using your app can't see the screen, can't use a mouse, or rely on assistive technology to read the page. Accessibility is a spectrum...
...This card teaches those basics and lets you experience your own MovieDB the way a screen-reader user does. Important Work on this lesson in teacher mode. Learning goals
...can explain what the DOM is and how it relates to the HTML the server sent. You can select elements by CSS selector, on the whole document or within a...
...can apply a change to many elements at once. You can explain why a script may run before the DOM exists, and how to wait for it. You keep JavaScript...
PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02-16'::date, '2001-12-21'::date) OVERLAPS...
overlaps -------- true An important caveat is that the date ranges are defined as start <= time < end. As such the later date is not included in the range:
Note: Consider using MATE instead of Gnome 3 on newer system Awesome is a very good tiling window manager that provides neat features like automatic layouting of windows, good multi...
Improve your font-rendering Copy /etc/xdg/awesome/rc.lua to ~/.config/awesome/rc.lua. Take a look, it's pretty self-explanatory. You can instantly apply changes by reloading Awesome with Meta-Ctrl-R.
Sometimes, due to git or other "accidents", important files get deleted or overwritten. At a state when even Ctrl+Z doesn't work anymore, you maybe can rescue your files...
...that file in the editor Go to RubyMine and click on VCS -> Local History -> Show History In the now open window, you should see all greater changes made to the...
...this lesson in builder mode. Learning goals You can explain what Bootstrap provides — base styles, a responsive grid, ready-made components and utility classes — and when a project benefits from...
...screen using only utility classes for spacing, display and text — no custom CSS. Build a side-by-side layout with the grid utilities: two content areas next to each other...
Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error will be green if you make any error in programming...
...E.g. a simple typo would make the test above green. The block will catch the Spec:: exception and the test will be happy. Be sure to always have custom errors...
If you have trouble updating something on FreeBSD you should always take a look in the UPDATING file. For this error there is this solution which worked perfectly for me...
...There was a nasty bug introduced in the update below, it was introduced in svn revision 373476 and corrected in 373485. If you get errors looking like this one: ===> Registering...