We recently decided our CI server needed an overhaul. I really enjoyed Integrity as a build server, but after trying out Hudson it’s hard to say I want to...
...go back. Hudson has several huge advantages...
...d like to analyze them to determine if it's possible to generate a string that matches more than 1 of them. Short of writing my own regex engine with...
...use case in mind, is there an easy way in C++ or Python to solve this problem...
...doesn't embed most fonts into the PDFs it generates. This means if you share a slide show with a font that is not Arial or Times, other people will...
...everything and creates a big ass PDF full of images. A workaround The only solution is to directly print the PDF to a PDF printer, or take the PDF generated...
When your Rails controller action responds with only a simple text, render text: 'Hello' may not be what you want. You should not even use it on Rails 4.1+ any...
By default, a "text" response from a Rails controller will still be a sent as text/html: render text: 'Hello' response.body # => "Hello" response.content_type # => "text/html" While this may not be...
...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
You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you move on with this note. Say this is your Spaceship...
...class with a transition launch and a release_docking_clamps callback: class Spaceship state_machine :state, :initial => :docked do event :launch do transition :docked => :en_route end before_transition :on...
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...
...s Deferreds. Native promises are much faster than their jQuery equivalent. Native promises are supported on all browsers except IE <=11, Android <= 4.4 and iOS <= 7. If you need Promise...
...support for these old browsers you can use a Polyfill. A very fast and small (2 KB minified and gzipped) polyfill is Zousan. If you want to waste even fewer...
Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some CONSTANT you have defined in an other class. Since actually...
...constants are called constants because they're constant, there's no way to easily stub a constant. Here are three solutions for you. Easiest solution Rethink! Do you really need...
...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...
Note: If you using a passenger lower than 5.0.10 you have to use sudo to run this command. If using it with capistrano you should use passenger >=4.0.41 and...
...s possible you get this "error" message: *** [err :: example.com] There are no Phusion Passenger-served applications running whose paths begin with '/var/www/example.com'. *** [err :: example.com] This is just because there were...
...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...
When adding a new field to your model's database table, don't set any defaults in the database. It makes people wonder why they get such values when reading...
Why? Because nobody looks at the database layout since such things are part of your application's logic -- and thus they belong into the corresponding model. How to
Say you want to vertically align a div box inside a div container. This is how you do it: HTML Some text... in two lines. CSS Set the line-height...
...The container MUST have a height >= its line-height, because the line-height actually spans the area inside which .box will align vertically. #container { line-height: 50px; } Because the container...
...a linear gradient to an element, IE9 removes all border-radius and inset box-shadows. This is because you probably are doing linear gradients with this weirdo Microsoft filter:
...progid:DXImageTransform.Microsoft.gradient(startColorstr='#0A284B', endColorstr='#135887'); filter hijacks the rendering of the entire element box, so you're out of luck. IE9 doesn't support CSS gradients. A forward-looking...
...queries, Internet Explorer 8 and below will fail to respect them. Though there are several options (like mediatizr and css3-mediaqueries), Respond.js was the only one that worked for me...
= javascript_include_tag 'media_queries_polyfill' Note: Using an IE conditional means other super-ancient browsers that do not support media queries (like Safari 2.x, or Firefox...
For applications coming with lots of stylesheets and scripts, asset compilation might take quite long. This can be annoying when deploying a release that does not actually change assets.
...your app uses Sprockets, you can simply skip asset compilation and re-use the previous release's assets. [1] That is especially easy via Capistrano. Capistrano will automatically symlink your...
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...
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...
...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...
...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...
...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.