I couldn't successfully execute a simple iptables command and got this error on an Ubuntu server: # /sbin/iptables -I INPUT...
When a gem author releases a new version to Rubygems, usually a tag with the version number (e.g. v1.2.0) is...
Jonas Nicklas, the author of Carrierwave and Capybara, has released Refile, a gem for handling file uploads in Rails. It...
ImageMagick takes a string with several options when cropping an image. See the command line options for how to provide...
Use it like this for inline icons: Germany They also work as block elements:
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
Make sure you have libcurl3-dev installed: sudo apt-get install libcurl3-dev gem install typhoeus
The condition for an if statement has to resolve to a boolean true/false value. However, all facts are strings, and...
Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...
JavaScript objects can have getter and setter functions that are called when a property is read from or written to...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...
You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...
Databound provides Javascript a simple API to the Ruby on Rails CRUD. Tries to expose a full model CRUD as...
Rails guide that covers PostgreSQL-specific column types and usages for Active Record. You should especially keep in mind the...
When you have an ngRepeat directive that uses track by, be sure to move the track by instructions to the...
capybara_element['attribute_name'] allows accessing an element's attributes in Capybara. A few examples: find('#my_element')['class']
When accepting GIF images, you will also accept animated GIFs. Resizing them can be a time-consuming task and will...
RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...
Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...
If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...
The Angular 1.2 way: # By default, angular returns undefined for invalid attributes which removes # the value from the form field...
SELECT enum_range(NULL::portal) # Returns an array of all possible values SELECT unnest(enum_range(NULL::portal)) # Unnests the...
Traveling Ruby is a project which supplies self-contained, "portable" Ruby binaries: Ruby binaries that can run on any Linux...