A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.
# Based on articles: | |
# https://ruhighload.com/%D0%9A%D1%8D%D1%88%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81+nginx | |
# https://wiki.enchtex.info/practice/nginx/cache | |
# https://gist.github.com/yanmhlv/5612256 | |
# https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html | |
# https://blog.runcloud.io/2017/10/28/nginx-caching-tutorial-wordpress.html | |
# https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps | |
# https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/ | |
<script> | |
function execPolyfill() { | |
(function(){ | |
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1. | |
/* | |
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
wkhtmltopdf is broken and cannot render multiple fonts because of some issues around names. See wkhtmltopdf/wkhtmltopdf#2435
- Pick an 8 or less char name for each font and variation e.g. HelvBold, HelvLite, TimeReg
- Every variation needs to be a separate font file, with all the details renamed in Font Forge using the short name determined before.
- Give the font files the same short name (e.g. HelvBold.ttf)
Svelte.dev: Tutorial • Docs • Examples • REPL • SvelteSociety
function relativeDate(str) { | |
var s = (+new Date() - Date.parse(str)) / 1e3, | |
m = s / 60, | |
h = m / 60, | |
d = h / 24, | |
w = d / 7, | |
y = d / 365.242199, | |
M = y * 12, | |
R = Math.round; | |
return s <= 5 ? 'just now' |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
A Pen by Matt Daniel Brown on CodePen.