Standard Braking Distance
- DE:
(Geschwindigkeit / 10) * (Geschwindigkeit / 10)
- EN:
(Speed / 10) * (Speed / 10)
Evasive (Emergency) Braking Distance
- DE:
((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
- EN:
((Speed / 10) * (Speed / 10)) / 2
While driving on the motorway you overtake several vehicles. A vehicle approaches you from behind with indicators and headlights flashing. What should you do?
When must you switch on the hazard lights on your vehicle? If my vehicle
// 1. Even or odd | |
function isEven(value){ | |
if (value % 2 == 0){ | |
return true; | |
} | |
else | |
return false; | |
} |
// Ensure CSS grid works with IE 11 spec. | |
// https://css-tricks.com/browser-compatibility-css-grid-layouts-simple-sass-mixins/ | |
// sass-lint:disable no-vendor-prefixes, no-duplicate-properties | |
@mixin display-grid { | |
display: -ms-grid; | |
display: grid; | |
} | |
// $columns values should be delimited by a space | |
@mixin grid-template-columns($columns...) { |
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Capitalize string | |
// -------------------------------------------------------------------------------- | |
// @param [string] $string | |
// -------------------------------------------------------------------------------- | |
// @return [string] |
This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.
The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.
npx create-react-app cra-ts --template typescript
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
//App structure: | |
// app_folder/ | |
// webpack.config.js | |
// /server/ | |
// server.js | |
// /src/ | |
// index.js | |
// How to run: from root folder run command: "node server/server" |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa |