tldp.org

$RANDOM on bash returns a random integer between 0 and 32767. echo $RANDOM 9816 echo $RANDOM 30922

makandra dev

Using CSS sprites for background images is a technique for optimizing page load time by combining smaller images into a...

makandra Operations

Create a 1 GB file to swap to (we have sufficient space on / on this machine. Use a different partition...

makandra dev

Next time you have to do more than trivial CSS changes on a project, you probably want to have live...

Set the hash to a dummy hash which doesn't hit any id at your page, for example: window.location.hash = "_";

You can use xmllint to pretty-print ugly XML files on your terminal. Just say: xmllint --format file.xml

blog.bigbinary.com

Remember why preloading associations "randomly" uses joined tables or multiple queries? If you don't like the cleverness of this...

makandra dev
looah.com

A great and enjoyable introduction into the concept of the web and about what HTTP was designed for. The original...

1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...

This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...

Active Record's select method allows you to make use of the power of MySQL select statements. On the one...

linuxsa.org.au

Here is a good explanation for zombie processes. Quote: If you have zombie processes it means those zombies have not...

The Rails secret_token must be unique for each application and any instance of it. If not, someone could exploit...

makandracards.com

In order to have more human readable git branches, do git pull --rebase To always pull like this, write these...

Merge requests are often rejected for similar reasons. To avoid this, before you send a merge request, please confirm that...

Do it like this: attribute :active, Virtus::Attribute::Boolean Long story In Virtus you define attribute with their type...

makandra dev

Sometimes sound breaks for me and speaker output is completely broken. This helped: pulseaudio -k && sudo alsa force-reload

Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...

makandra dev
askubuntu.com

Good article that tells you how to change behavior of certain keys via xmodmap (with the help of exv if...

Back in the old days, we couldn't do something like that: .foo { position: absolute; bottom: 0; /* This was bad...

When you need to find out in which kind of spec you are during run-time, it's definitely possible...

Sometimes you need a piece of code to do something different for specs than for features. If you don't...

When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not...

railway.at

Note: These instructions are for a quick per-project setup and may require you to change code. If you generally...