...be answered with an empty response if the underlying content hasn't changed. This saves CPU time and reduces the bandwidth cost for a request/response exchange to about 1 KB...

...can be considered secure. Random masking of CSRF tokens was introduced to mitigate BREACH, a side-channel attack against HTTPS that was published in 2013. BREACH is pretty hard to...

Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common task, we should have an efficient way to do it...

...Let's say I need this HTML structure: item 1 item 2 This card compares various approaches to fabricating DOM elements for testing. Constructing individual elements While you can use...

Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a few times. While there are significant differences from project to...

...project, we do have a list of general suggestions. Before you start, talk to someone who has done it before, and read the following hints: Understand the old system

makandra Operations

on the bash (issued as postgres user) Start/Stop/Restart PostgreSQL pg_ctl -D $configdir start|stop|restart Start/Stop/Restart the corresponding PostgreSQL using the given configuration directory. The configuration directory should contain...

...the postgresql.conf file. The following example would start the PostgreSQL of our governor instances: pg_ctl -D /var/lib/postgresql/config start PostgreSQL fast shutdown pg_ctl -D $configdir stop -m fast

To open a terminal quickly navigate to System → Preferences → Keyboard Shortcuts. There, click the "Run a terminal" row (It should be in the "Desktop" section) and press the keyboard shortcut...

...for Ubuntu's default terminal is gnome-terminal. Be aware that many programs use shortcuts of their own and you would not want to clash with those (like Ctrl+T...

When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes may affect the result and performance of your regular expressions...

...In the worst case, an ill-suited mode may make your regular expression so slow that it can DoS your application (Examples are the ActiveRecord's PostgreSQL CVE...

You can make both mobile Chrome and mobile Safari display a native app install banner. The banner suggests that the user installs an app that is related to the current...

...page. It is shown in the phone's native UI. See attached animation. There is some fineprint you need to read to make this work (see below). References Android: Increasing...

Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the following example, you may not longer use collection.make.

ruby.about.com

The flip-flop operator is a hotly contested feature of Ruby. It's still struggling to find an idiomatic use case, except for a few very rarely needed things. It...

...s not something you'll likely reach for on a daily, weekly or even monthly basis. The only thing you really need to know about it is what it does...

...Claude Code, Codex, and Cursor can work on multiple tasks in parallel by creating separate Git worktrees. Each worktree has its own working directory, but Rails will normally use the...

...across all worktrees. This can cause conflicts when agents run tests, change the database schema, or modify test data simultaneously. This card shows a harness-agnostic technique to give every...

TL;DR: Pannellum is a small (~56 kB, own WebGL renderer, no three.js) equirectangular panorama viewer. The npm package has no ES module export - importing it runs an IIFE that...

...assigns the API to window.pannellum. Bundle it statically, make sure the viewer's container gets a definite size, and allow blob: in your img-src CSP. Considered Photo Sphere Viewer...

Rails has configurable time zones, while Ruby is always in the server's time zone Thus, using Ruby's time API will give you wrong results for...

...zones, because their existence is a fact. You can, however, tell Rails the only single time zone you'll need is the server's. config.time_zone = "Berlin" # Local time zone...

...you have files in your .gitignore they won't be considered for changes, but still you might want to get rid of them, e.g. because they clutter your file system...

...While a regular git clean will ignore them as well, passing the -x switch changes that: git clean -x If you want to see what would happen first, make sure...

...toggle an outlining of HTML elements quickly. This helps greatly when you want to see the actual dimensions of elements, e.g. for floating elements inside containers, instead of opening up...

...shortcut (Shift+G for the 9.2-compatible layout or for the default layout with enabled "single-key shortcuts") and select "Outline" from the View → Style menu (needs to be done...

The program 'foo' can be found in the following packages: * foobar * barfoo Try: sudo apt-get install -bash: foo: command not found But you can customize this with the...

...connected with ssh. Because I'm using $@ I can also use options like a custom ssh-port...

Angular's location provider stalls links to the current URL, i.e. window.location. As soon as the $location service is activated in an Angular app, it will intercept links. The click...

...your interaction with the browser history (i.e. you're just using Angular as JS sugar on your page), Angular will create the above issue as soon as you use anything...

This is an attempt to list some of those things: On the server Always optimize: Don't do stupid things with the database. Avoid "n + 1" queries. Don...

...Use form models. Optimize on demand: Don't optimize without knowing what's actually slow. Measure first, for example by using a performance monitoring tool like NewRelic, Scout, AppSignal, Skylight...

If your shell seems frozen You probably pressed Ctrl-S which stops the buffer. Try Ctrl-Q to resume. If your shell behaves strangely (no input being displayed, strange character...

...Try typing this, followed by pressing the return key: reset That should clear the screen and reset output settings etc...

When navigating back to a page that was received from a POST request, undesired side effects may happen. Therefore, modern browsers try to keep users from doing so, i.e. Firefox...

...an error page explaining what's wrong. If the user presses "Try Again", it shows an additional alert asking whether the user is certain. Solution If you need to circumvent...

When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only work on MyISAM tables, but will one day work on...

...InnoDB tables. The workaround right now is to extract your search text to a separate MyISAM table, so your main table can remain InnoDB.) I always wondered how those two...

...be a quick fix for an existing app. It also ensures that future uploaders get safe-ish defaults when the developer forgets to define an allowlist for concrete uploaders (see...

...you can also go with this more relaxed CSP: Content-Security-Policy: default-src 'self'; script-src 'none'; object-src 'none' While this does not fix users uploading executables etc...

bbs.archlinux.org

xterm by default uses black text on white background. To change that to something like "light gray on black", do a vim ~/.Xresources ...and put this in there: xterm*background...

xterm*foreground: lightgray Afterwards, feed these changes to your current X session: xrdb ~/.Xresources Any subsequent xterm will be colored white on black background. Hint: While you're at...

...you will build features on top of an LLM API. Both come with a security story — and it's the same word, prompt injection, describing two different attacks. This card...

...an agent — training against injected instructions, untrusted-content handling, auto mode's command review, sandboxing — and why your own review of the agent's actions is the layer you control...

bundler.io

bundle open BUNDLED_GEM will open the BUNDLED_GEM's source code in your default editor...