The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside of it. Here's how you do it (also try...
} .child {} When .child elements are inline elements, add display: block; to their style. When you need to specify the width of .child elements, center them with margin: auto...
...ways to render a button with CSS: Foo We cannot express it with a single have_css() matcher, since we need the { text: 'Foo' } option for some cases ( ), but not...
...button", text: 'Foo') match_button_input = have_css("input[type='button'][value='Foo']") match_submit_input = have_css("input[type='submit'][value='Foo']") expect(page) .to match_button
If your Ruby project includes a gem like Spreewald that comes with some external step definition, RubyMine does not know about them by default and will highlight the step as...
...an undefined reference: To link these external step definitions to RubyMine, add the corresponding gems to your RubyMine-Settings: Go to Settings (ctrl + alt + s) Go to Languages and Frameworks...
...them. The goal is that if you're building a website using flexbox and something isn't working as you'd expect, you can find the solution here.
...spec continues to evolve and vendors nail down their implementations, this repo will be updated with newly discovered issues and remove old issues as they're fixed or become obsolete...
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. Visit chrome://flags/ Search (Ctrl+F) for "Material Design" Switch to "Non-Material" Restart Chrome Chrome's default theme should now be pretty again...
...be installing rbenv and ruby-build from our own fork, not from the Ubuntu sources. Installing rbenv Install rbenv: git clone https://github.com/rbenv/rbenv.git ~/.rbenv For Bash: echo 'export PATH...
...echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(rbenv init -)"' >> ~/.zshrc Now reinitialize your shell, e.g. by opening a new terminal. Running type rbenv should then say "rbenv is a...
...and allows a lot of image editing before rendering the favicons, in all needed sizes, formats and with the HTML needed to include them! In Rails applications with Haml:
...all the favicon files into /public store the HTML to app/views/layouts/_favicon.html add = render 'layouts/favicon' to in your application layout(s) ... and you're all set...
...installation to a newer version. If you're installing RubyMine for the first time, see install RubyMine under Ubuntu. You might also consider installing RubyMine with snap, so it can...
...license key from Help → Register; you may need it to reactivate the new version Shut down RubyMine Extract the downloaded file into your ~/bin/. [1] cd ~/bin && tar xzvf ~/Downloads/RubyMine-X.Y.Z.tar.gz...
...code into a gem. You know a gem was cut with Jeweler if you see the word jeweler in a gem project's Rakefile. This note describes how to update...
...probably defining the gem version in the Rakefile instead of in VERSION. Change this. Say rake release. This will do many things for you: Generate GEMNAME.gemspec and commit it
...a project, you probably want to have live CSS reloading, so every time you safe your css, the browser updates automatically. It's pretty easy to set up and will...
...safe you a lot of time in the long run. It will also instantly reload changes to your html views. Simply follow the instructions below, taken from blog.55minutes.com.
...also want to check out BoxCryptor which does pretty much the same, and is supported across many more platforms. I just didn't want to use Dropbox...
...One to automatically sync confidential files between my machines. The encryption is done via encfs, which is a file-based encryption that simply puts encrypted versions of files from one...
...offers a free app to build custom icon webfonts. It offers downloads as webfont set (.eot, .ttf, .woff, .woff2) or as icon set of SVG and/or PNG and many more...
...file types, or even SVG sprites. From my experience, the frontend developer should create the font, and not the designer. There are many tweaks required during font development, and routing...
I've recently moved from using Parallels for browser testing to Sun's Open Source VirtualBox. Here's a walkthrough on how to get a browser testing suite for free...
Every now and then, Java is subject to security issues where code can break out of Java's sandbox and obtain more privileges than it should. In almost all cases...
...by attacks via the Java browser plug-in, for example by malicious ad banners. Since removing Java completely is not an option for us, make sure the Java plug-in...
Cucumber step argument transforms can be a powerful way to make your steps more flexible. Note however that if your transform only matches a substring (no ^ and $ markers at the...
...beginning and end), you are still expected to return a replacement for the whole string that was piped through the transform. If you don't do that, you will truncate...
In order to save the original value of a constant, set the new value and restore the old value after a scenario was completed, you can use the following helper...
...It takes care of saving the old constant value, setting the new one without throwing warnings and resets the value with an After hook. This module also enables you to...
...Eventually you will want want the same detection logic to be available on both server and client side. This card shows how to get a Ruby method touch_device? for...
...detecting touch devices by grepping the user agent, and the keyword list we are sniffing for sure is lacking many unpopular phones. In your ApplicationHelper: def touch_device?
If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from beginning and end). The reason is that your users will...
...one will usually notice this until you get the weirdest bug reports (e.g. two seemingly equal records are not, or multiple records for "unique" values). Use the attached trait in...
...don't do JavaScript rendering on the client, it's best practice to put script tags at the bottom of the HTML. This way, the page can start to render...
...before scripts have been loaded and run. The caveat is that you also have to move all other script tags from your views to the bottom of the page. This...
First, go to the webinterface of your phone. Choose Software Update in the navigation on the left. Next, you have to find the current firmware version for your model in...
...the snom wiki. To do this, you have to follow the ? next to the Firmware text field to this page and then follow the link of the current firmware below...
...reduce the pain is to to use Underscore.js's functions like _.each, _.map or _.select, which unfortunately clutters your code with awkward calls to the _ helper. Fortunately when you use...
...has a very versatile for keyword that can do anything that each, collect or select can do. Enjoy! each for item in items ... collect / map ages = (person.age for person in...
...embedded web fonts in the past years (e.g. by copying CSS from a Font Squirrel @font-face kit), that CSS won't work in Internet Explorer 9.
...it by turning these styles... @font-face font-family: 'MyFont' src: url('myfont.eot') src: local("☺"), ('myfont.ttf') format("truetype") font-weight: normal font-style: normal ... into these: @font-face
When creating an ActiveRecord with .new, .create or create!, you cannot set the ID attribute (note: When using Machinist's .make you can). This is because even when you are...
...are always protected. These attributes are #id and #type. If you want to allow setting #id on .new, .create or create! you can include the attached module in order to...
...iconv -f UTF-16 -t UTF-8 de_neu.dic -o ~/Documents/dic/de_neu_utf8.dic In RubyMine: Go to Settings (CTRL + ALT + S) > Editor > Spelling > Dictionaries and add the folder ~/Documents/dic