When logging in Rails, you can use the log_tags configuration option to add extra information to each line, like...

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...

Here is an ES5 object literal with two string properties and a function property: let user = { firstName: 'Max', lastName: 'Muster...

makandra dev

# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...

Let's say you want to merge the properties of two JavaScript objects: let a = { foo: 1, bar: 2 }

makandra dev
github.com

If you render markdown from user input, an attacker might be able to use this to inject javascript code into...

When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...

Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

github.com

The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...

Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

To test that an object was constructed by a given constructor function, use jasmine.any(Klass): describe('plus()', function() { it ('returns...

Browsers come with a set of built-in elements like or . When we need a new component not covered by...

matthewphillips.info

A while ago I tweeted a thread about how a small JavaScript snippet, one that can fit in a single...

api.rubyonrails.org

ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To freeze the current time, use...

This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...

jQuery is still a useful and pragmatic library, but chances are increasingly that you’re not dependent on using it...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

This collection contains some useful design resources for developers. Many of them were mentioned in the Refactoring UI tutorials.

makandra dev

CSS transitions are a simple animation framework that is built right into browsers. No need for Javascript here. They're...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...