Postgres Index Types

Posted About 8 years ago by Henning Koch.
robots.thoughtbot.com

When creating an index using CREATE INDEX, Postgres will create a B-Tree type index by default. The B-Tree...

jQuery promises: done() and then() are not the same

Posted About 8 years ago by Henning Koch.

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

MySQL / MariaDB: Show disk usage of tables and columns

Posted About 8 years ago by Thomas Eisenbarth.

You can find out about disk space usage of all tables within your database by running this: SELECT table_name...

Stackprof - sampling call-stack profiler for ruby

Posted About 8 years ago by Tobias Kraze.
github.com

Stackprof is a sampling call-stack profile for Ruby 2.1+. Instead of tracking all method calls, it will simply collect...

Linux: Open a file with the default application

Posted About 8 years ago by Henning Koch.

If you are on a Linux shell and want to open a file with whatever default application is configured for...

Testing ActiveRecord callbacks with RSpec

Posted About 8 years ago by Henning Koch.

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...

Testing ActiveRecord validations with RSpec

Posted About 8 years ago by Henning Koch.

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...

record a logstalgia video

Posted About 8 years ago by Claus-Theodor Riegg.

Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...

How to generate a Rails-compatible query string

Posted About 8 years ago by Dominik Schöler.
stackoverflow.com

From Rails 3.0.9, there is a method Hash#to_query that will turn a Hash into a query string:

Geordi 1.3 released

Posted About 8 years ago by Dominik Schöler.

Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...

ActiveRecord meets database views with scenic

Posted About 8 years ago by Emanuel.
github.com

Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...

Marvel | Elastic

Posted About 8 years ago by Arne Hartherz.
elastic.co

Dashboard (Marvel Kibana) and query tool (Marvel Sense) for Elasticsearch. Once installed you can access Kibana and Sense at these...

Linux Performance Analysis in 60,000 Milliseconds

Posted Over 8 years ago by Thomas Eisenbarth.
techblog.netflix.com

You login to a Linux server with a performance issue: what do you check in the first minute? uptime

PostgreSQL: Show size of all databases

Posted Over 8 years ago by Thomas Eisenbarth.

SELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER...

How to query PostgreSQL's json fields from Rails

Posted Over 8 years ago by Dominik Schöler.
postgresql.org

PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...

rack-mini-profiler - the Secret Weapon of Ruby and Rails Speed

Posted Over 8 years ago by Henning Koch.
nateberkopec.com

rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...

Use jQuery's selector engine on vanilla DOM nodes

Posted Over 8 years ago by Henning Koch.

There are cases when you need to select DOM elements without jQuery, such as: when jQuery is not available

MySQL/MariaDB: Hide all sleeping processes in processlist

Posted Over 8 years ago by Thomas Eisenbarth.

If you have many connections to your MySQL or MariaDB (as we have) you might want to filter the list...

CSS: Select elements that contain another selector

Posted Over 8 years ago by Henning Koch.

CSS4 comes with :has. E.g. h1:has(b) would select all tags that contain a tag. This is implemented in...

Preconnect, Prefetch, Prerender ...

Posted Over 8 years ago by Dominik Schöler.
docs.google.com

A very informative and interesting presentation about browsing performance, looking at efforts Google Chrome takes to increase it.

Case Study: Analyzing Web Font Performance

Posted Over 8 years ago by Dominik Schöler.
keycdn.com

Table of contents of the linked article: What are Web Fonts? Advantages of Web Fonts Disadvantages of Web Fonts

get haproxy stats/informations via socat

Posted Over 8 years ago by Claus-Theodor Riegg.

You can configure a stat socket for haproxy in the global section of the configuration file: global daemon

jQuery: How to attach an event handler only once

Posted Over 8 years ago by Arne Hartherz.

With "attaching an event handler once" you possibly mean one of these two things: Register a function for an event...

Lazy-loading images

Posted Over 8 years ago by Dominik Schöler.
github.com

Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...