...styling advice that's mainly taken from SMACSS. Although at makandra we're using BEM instead of SMACSS, here's my favorites. Do not use ID's in CSS Selectors...
...a page so do not use ID's for CSS. Id's are much better used as javascript hooks so use them for this instead. .list {…} instead of #list {…}
Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...
It can be useful to have a Ruby expression like condition ? positive_case : negative_case in MySQL queries:
Until May 2011 our gems have been created with Jeweler, which is a helper library to package code into a...
Add the following to /etc/rc.local: (sleep 3 && echo disable > /proc/acpi/ibm/bluetooth)& Bluetooth icon will be active for a few seconds, then...
If you tried out Compiz on top of Xfce and found it to be a world of pain like me...
The linked article has a great explanation how to to deal with string encodings in Ruby. Furthermore you can check...
When you drag a file from a Nautilus window into a terminal window, the file's path will be pasted...
Give the table a style table-layout: fixed Give the cells in the first row a width The same width...
Let's say you have an Explorer window showing a directory and want a cmd terminal to be opened there...
This will install a printer called "PDF": sudo apt-get install cups-pdf Files will be put into ~/PDF/ without...
Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating...
Programming is a deceptively damaging field to be in, partly because it doesn't seem like you're doing much...
Currently, only up to 500 rows of Analytics table data can be exported at a time into CSV format. If...
On my Ubuntu MATE machine, switching applications with ALT + TAB was impossible, because it took nearly 2 seconds. The culprit...
A collection of code snippets which return a boolean value for a regex comparison. regexp.match?(string) # Recommended for Ruby >= 2.4...
DTAUS & DTAZV are formats for German bank transfers and is short for "Datenträgeraustausch". The format itself totally sucks because it...
When writing a story description in Pivotal Tracker, there is now a tiny button at the bottom of the description...
If you plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you...
If you use Tempfile and pass your own filename containing an extension, it will just be consumed by the Tempfile...
Google’s Font Directory and API for web fonts could have a transformative effect on how we read the web...
...Open Source software. It's about assessing your real needs and understanding the cost-benefit balance before making significant financial decisions. Don't try to dust your crops with a...
If your pidgin IM fails to connect to ICQ, you may need to update it. The ubuntu default sources are...
...is something like # WRONG class Page < ActiveRecord::Base %w[main sub].each do |type| belongs_to "#{type}_title" end end # RIGHT class Page < ActiveRecord::Base %w[main sub].each do...
belongs_to :"#{type}_title" end end Always convert to a symbol, otherwise you'll have all kinds of fun. Newer rails / activerecord (at least 5.2) will throw an association...