...session using the database. This could be the rails server, rubymine and many more. Beside terminating the session connection manually you can also find out the pid and kill the...
To parse XML-documents, I recommend the gem nokogiri. A few hints: xml = Nokogiri::XML(" foo bar ") parses an xml...
If your project depends on an old version of ImageMagick that you can no longer install in your system, you...
Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...
...you usually group tasks by their domain/scope. An example crontab might look like this: # Begin Whenever generated tasks for: project100 MAILTO="log@example.com" MAILFROM="cron@example.com" # When server is booting up, ensure...
While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not...
Some older Node modules rely on window.jQuery to be present. One suggested solution is to use this config in the...
Webfonts are not always available when your JavaScript runs on first page load. Since fonts may affect element sizes, you...
SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...
When working with large Sass files you will notice that the first request after a change to a Sass file...
At times, it might be unavoidable to have different CSS rules for Internet Explorer than for sane browsers. Using Sass...
For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...
OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...
...initializer provides a default way to deal with this. You'll get the following behaviour: if the incorrect request has a HTTP_REFERER coming from the same application, set a...
...table names and execute a DROP TABLE statement for each. DO $$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP EXECUTE 'DROP...
...rc1) must be separated by a dash, like this: 1.0.0-rc1 2.3.0-alpha2 3.0.0-beta3 Publishing to a pre-release tag npm packages have multiple "current" releases, identified by "tags...
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low...
During debugging you might pepper your code with lines like these: console.log('foo = ' + foo + ', bar = ' + bar) I recommend to use...
When such a virtual attribute should contain Date values you might get unexpected behavior with forms, because every param is a string and you don't get the magic...
...In Rails 3.1+ the asset pipeline will take care of this. Thus you're best off using an uncompressed version of your Javascript in development. Also load the non-minified...
The Angular 1.2 way: # By default, angular returns undefined for invalid attributes which removes # the value from the form field...
...specifying the controller as 'user/...' would make Rails expect views in view/user/... (singular) The better approache might be to use a module. See this card on how to namespace with...
When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...