This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # send logs for all traffic (including non-html) to google analytics | |
| # | |
| # in server block: | |
| # set $google_analytics_id "UA-THECORRECT-ID"; | |
| # include /srv/nginx/google_analytics; | |
| # | |
| # in location blocks: | |
| # post_action @ga; | |
| # | |
| # notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day. |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require": { | |
| "typo3-console/composer-auto-setup": "^0.1", | |
| "georgringer/news": "^6.1", | |
| "helhum/typo3-secure-web": "^0.2.5", | |
| "typo3/cms-introduction": "^3.0" | |
| }, | |
| "extra": { | |
| "typo3/cms": { | |
| "cms-package-dir": "{$vendor-dir}/typo3/cms", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// map-sort | |
| /// Sort map by keys | |
| /// @param $map - A SASS map | |
| /// @returns A SASS map sorted by keys | |
| /// @requires function list-sort | |
| /// @author Jake Wilson <jake.e.wilson@gmail.com> | |
| @function map-sort($map) { | |
| $keys: list-sort(map-keys($map)); | |
| $sortedMap: (); | |
| @each $key in $keys { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// list-sort | |
| /// Sort a SASS list | |
| /// @param $list - A SASS list | |
| /// @returns A sorted SASS list | |
| /// @requires function list-remove | |
| /// @author Jake Wilson <jake.e.wilson@gmail.com> | |
| @function list-sort($list) { | |
| $sortedlist: (); | |
| @while length($list) > 0 { | |
| $value: nth($list,1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// list-remove | |
| /// Remove an item from a list | |
| /// @param $list - A SASS list | |
| /// @param $index - The list index to remove | |
| /// @returns A SASS list | |
| /// @author Jake Wilson <jake.e.wilson@gmail.com> | |
| @function list-remove($list, $index) { | |
| $newList: (); | |
| @for $i from 1 through length($list) { | |
| @if $i != $index { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// linear-interpolation | |
| /// Calculate the definition of a line between two points | |
| /// @param $map - A SASS map of viewport widths and size value pairs | |
| /// @returns A linear equation as a calc() function | |
| /// @example | |
| /// font-size: linear-interpolation((320px: 18px, 768px: 26px)); | |
| /// @author Jake Wilson <jake.e.wilson@gmail.com> | |
| @function linear-interpolation($map) { | |
| $keys: map-keys($map); | |
| @if (length($keys) != 2) { |
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.
Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| "react", | |
| "stage-2", | |
| [ | |
| "env", | |
| { | |
| "targets": { | |
| "browsers": [ | |
| "last 2 versions", |
