web.archive.org

Restricting access to cookies is essential for security in many web apps. For example, the session ID, the secret token...

Let's say you have a gem which has the following module: module SuperClient def self.foo 'Foo' end

keepachangelog.com

We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

makandra dev

If you need to run a program on a remote machine (e.g. to your office PC) with a graphical UI...

Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...

In general, the tracker should always be the definitive source of truth of what needs to be done as part...

In a project team for a bigger project people have several roles: Developer: at makandra Project lead: at makandra

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

When you receive a ZIP file from a Windows user, umlauts and other non-latin1 characters in filenames may look...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

Haml lets you prefix a group of attributes by wrapping them in a hash. This is only possible with the...

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

makandra dev

For webpages to load fast it's recommended to optimize images. Ideally an image's file size should be as...

If you want to fill in textareas with multiple lines of text (containing line breaks / new lines) you can use...

benmccormick.org

The linked article lists a number of techniques that were best practices with ES5, but have better alternatives in modern...

To make a local copy of an S3 bucket, I use the s3cmd command line tool. Configure access keys:

If possible your code should detect features, not browsers. But sometimes you just need to sniff the browser. And when...

On some machines, installing Ruby 1.8.7 with ruby-build can lead to this error: math.c:37:13: error: missing binary...

Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...

makandra dev
litmus.com

The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important...

To catch all possible exceptions from a network call, we need to rescue many error classes like this: rescue SocketError...