...s calc(100 - l)); Here is what happens: from currentColor tells hsl() to start with the value of currentColor. calc(h + 180) rotates the color hue by 180 degrees, i.e...

...to the opposite of the color wheel. s keeps saturation unchanged. calc(100 - l) inverts lightness. For example, 0% becomes 100%, and 100% becomes 0%. Example usage .demo { --inverted-color...

DevOps Curriculum

...diesen verschiedenen Verbindungsversuchen erklären: nc makandra.de 22 nc ccc.de 22 nc app02-stage.makandra.makandra.de 22 Du kannst Sequence-Numbers erklären Du kennst die Unterschiede zwischen UDP und TCP und kannst Beispiele nennen...

...makandra.de aufbauen und die Datei robots.txt abrufen (Siehe https://richj.co/talking-http-1.1/) Du weisst, was dieser Server-Header bedeutet: Strict-Transport-Security: max-age=31536000 IPv6 Wie werden MAC Adressen bei...

...uses a "real" time zone or :local, and if config.active_record.time_zone_aware_attributes is set to false or not. With time zones configured, always use .current for Time, Date, and...

...which hold time zone information and Time.now only in those that run with the server's time. If you don't, bad things can and will happen. More information can...

...more complicates it is easier to understand and to process. Note: In case a string does not match the pattern, .match will return nil. With Ruby 2.4 the result of...

...transformed to a Hash with named_captures. This allows you to use methods like slice or fetch on the result. Example with a multiple assignment PRODUCT_PATTERN = /\A(.+) S\/N...

makandra dev

...or position: fixed display: inline-block display: table-cell overflow: (not "visible") and more, see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context Example: A fluid main area with a right sidebar

...you don't want either column to clear content of the other. Float the sidebar to the right and you're set: its content now renders in the sidebar's...

...the code below to check whether the browser can make connections to the current site: await isOnline() // resolves to true or false The code The isOnline() function below checks if...

...you can make real requests by re-fetching your site's favicon. If the favicon cannot be downloaded within 6 seconds, it considers your connection to be offline. async function...

...with an english name. This makes you code easier to read and is also suggested by Rubocop's Style/GlobalVars cop. Example before: if 'foo' =~ /foo/ puts $~[1] # => foo end

...following content: require 'English' List of global aliases $ERROR_INFO => $! $ERROR_POSITION => $@ $FS => $; $FIELD_SEPARATOR => $; $OFS => $, $OUTPUT_FIELD_SEPARATOR => $, $RS => $/ $INPUT_RECORD_SEPARATOR => $/ $ORS => $\ $OUTPUT_RECORD_SEPARATOR => $\ $INPUT_LINE_NUMBER...

makandra dev

When your application is open for public sign up and sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers...

...work hard to eliminate spam and have put in place relatively tight checks what kinds of emails they will accept, and from whom. To that end we use tools like...

...and autoload paths. They do NOT create a module for namespacing. This is intuitive, since there normally is no module Model, or module Controller. If you want to add a...

├── models ├── uploaders # No config needed ├── util # No config needed └── workers # No config needed Sometimes it's handy to group files within a directory, but not reflect that grouping within...

If your railscomplete-deployment uses the net-ssh-gem please ensure you use version 5.2.0 or newer to ensure you can deploy via Capistrano. It's best to use...

To completely remove the old host key on the client run: # remove host entry ssh-keygen -f "$HOME/.ssh/known_hosts" -R appserver.makandra.de # remove IP entry ssh-keygen -f "$HOME/.ssh/known_hosts" -R $(getent...

makandra Curriculum

Understand at least the following CSS concepts: Classes Selecting elements for styling Basic styling (color, typography, spacing) The box model Inline elements vs. block elements Ways to layout elements...

...Learn how to use your browser's "inspect" feature and how you can see which CSS styles are applied to an element Learn what a "reset stylesheet" is.

adobe.com

Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to do this: The preferred way is to use the ExternalInterface...

...ActionScript by calling SetVariable(name, value) on the Flash movie's DOM element. This is super-legacy, but still encountered in the field. Note that communication between a Flash movie...

kernel.org

Git allows you to do a binary search across commits to hunt down the commit that introduced a bug. Given you are currently on your branch's HEAD that is...

...not working as expected, an example workflow could be: git bisect start # Start bisecting git bisect bad # Tag the revision you are currently on (HEAD) as bad. You could also...

...throw in some locking mechanism, but then are usually done with it. Unfortunately, transactions semantics in databases are actually very complicated, and chances are, your making some incorrect assumptions.

...engine actually has four different modes for transactions: READ UNCOMMITTED READ COMMITTED REPEATABLE READ SERIALIZABLE READ UNCOMMITED gives you the least isolation between transactions (i.e. one transaction can see most...

...be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a sign-up form. It runs inside your application and does not depend on an external...

...set config.not_rfc_mx_lookup_flow = true. Validation methods explained Regex validation (1) is pretty straight-forward and basically "free" since you're not making and network connections. SMTP validation...

...a minifier that is good enough for most cases. If you're looking to squeeze out as many bytes as possible, you can consider compressing with Terser instead.

...will increase your build times significantly, but produce the smallest output: Terser (3 pass) Terser (1 pass) esbuild application.js 163.6 kB 163.7 kB 181.6 kB application.js (gzipped)

...to do a VACUUM FULL without holding an exclusive lock during processing. There is still a need of one exclusive lock at the beginning and the end of the repacking...

...affected table. Warning pg_repack writes a copy of the whole table. The database server needs to have at least ($size_of_biggest_table * 2) + some buffer free disk space...

When restoring a barman PITR backup you may encounter this error: Copying required WAL segments. EXCEPTION: {'ret': 2, 'err': '/bin/sh: 1: cannot open /var/lib/barman/foopostgres/wals/00000007.history: No such file\n', 'out': ''}

...present in the wals directory of your backup. The most likely reason is that someone deleted this file in the past. If you do not need this file for restoring...

...command on a server which continues to run after the SSH session is closed. Consider systemd-run as alternative. It will turn every command in a systemd service unit:

...openssl speed` as unit run-benchmark.service $ sudo systemd-run --unit=run-benchmark openssl speed # Query the current status $ systemctl status run-benchmark.service ● run-benchmark.service - /usr/bin/openssl speed Loaded: loaded (/run/systemd/transient/run-benchmark.service; transient) Transient: yes

jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored in a global, internal jQuery cache object. Every time you...

...gets deleted is when you call remove() on the element that put it there! Since cache entries also have a pointer back to the element that spawned them, it is...

w3c.github.io

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example visits a web page and reads the a headline's...

...things you can do with it, but performing more advanced tasks without a tool like selenium-webdriver can be quite difficult. However, for simple debugging or remote-controlling, curl might...

Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed output. Let's take this function: function fn() {

...this to the following code: console.log(a||b?"foo":c()) Note how: The if statement has been replaced by a tertiary expression. This is often less readable, but it doesn...

When storing floating-point numbers such as prices or totals in an SQL database, always use a DECIMAL column. Never use FLOAT or kittens will die. DECIMAL columns are parametrized...

...with a precision and a scale. These parameters describe which numbers can be stored in that column. E.g. a decimal with a precision of 5 and a scale of...

There is an option you can set so that when using the cd command, small typos are automatically corrected. Add the following to your ~/.bashrc: # cd: autocorrect small typos and...

shopt -s cdspell Example: cd Porjects # Projects pwd # /home/judith/Projects Also, I recommend adding aliases for your most common typos of commands you regularly use to your ~/bashrc...