makandra dev

Promises are the new way™ to express "Do this, and once you're done, do that". In contrast to callbacks...

There's no user interface to give an AWS IAM user read/write access to a selected list of S3 buckets...

Ruby's __FILE__ keyword returns the path to the current file. On popular for this are Ruby binaries: #!/usr/bin/env ruby...

We're using Middleman for some static sites like our blog. Despite being very similar to Rails, Middleman does not...

Resources Rails Guide: Internationalization API Guide to localizing a Rails application Locale-aware helpers in ActionView::Helpers::NumberHelper

By convention, common protocols use a defined port, like 80 for HTTP or 443 for HTTPS. You can use nmap...

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

The default Google Analytics might not work as expected with your Unpoly app. This is because your app only has...

So you want to use object-fit, but you also need to support Internet Explorer. One option is to use...

github.com

Ever needed to use a global variable in Rails? Ugh, that's the worst. If you need global state, you...

As you may know, HAML expands data attributes that are given as a hash: %div{ data: { count: 3 } }

jakearchibald.com

The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...

to create a Gallery that has a name and has_many :images, which in turn have a...

jqueryui.com

UI sortable helps reordering items with drag 'n drop. It works quite fine. Proven configuration for sorting table rows

makandra dev
thecssninja.com

Sometimes you want to preload images that you will be using later. E.g. if hovering over a an area changes...

When you have a localized website, you may want to redirect users to their preferred language when they visit the...

github.com

fake_stripe spins up a local server that acts like Stripe’s and also serves a fake version of Stripe.js...

developer.mozilla.org

When building a form with a file select field, you may want to offer your users a live preview before...

OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...

You can use JavaScript to get or set cookie values on the client. Using the vanilla JavaScript API

jQuery's deferred objects behave somewhat like standard promises, but not really. One of many subtle differences is that there...

puppet.com

Don't use exec without user parameter If you use exec without user parameter, the command will get executed as...

makandra dev

Sometimes you might want to check a short link for it's destination before clicking on it. Additional you get...

To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.