TBD
This file contains 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
type MapHandler<T> = (item: T, index: number, callback: (result: T) => void) => void; | |
type MapDoneHandler<T> = (results: T[]) => void; | |
function map<T>(array: T[], handler: MapHandler<T>, done: MapDoneHandler<T>) { | |
let index = 0; | |
let results: T[] = []; | |
step() | |
function step() { |
This file contains 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
/* Reset */ | |
*:where(:not(iframe, canvas, img, svg, video):not(svg *, symbol *)) { | |
all: unset; | |
display: revert; | |
} | |
*, | |
*::before, | |
*::after { |
This file contains 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
const dayjs = require('dayjs') | |
let start = dayjs().startOf('day') | |
const end = start.add(1, 'day') | |
const results = {} | |
while (start.isBefore(end)) { | |
const fmt = start.format('HH:mm') | |
const qs = fmt | |
.replace(':', '') |
This file contains 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
FROM php:7.3-apache | |
ENV APACHE_DOCUMENT_ROOT /var/www/html/public | |
RUN docker-php-ext-install pdo pdo_mysql | |
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | |
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
RUN a2enmod rewrite |
This file contains 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
/* global $ */ | |
import throttle from 'raf-throttle' | |
export default class Header { | |
constructor (el) { | |
this.el = el | |
this.hiddenClass = 'hidden' | |
} | |
stick () { |
This file contains 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
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6, | |
.word-wrap, | |
.word-break { | |
overflow-wrap: break-word; | |
word-wrap: break-word; |
This file contains 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
(function () { | |
'use strict' | |
self.addEventListener('fetch', event => { | |
let request = event.request | |
if (request.method !== 'GET') { | |
return | |
} | |
event.respondWith( | |
caches.match(request) | |
.then(response => { |
This file contains 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
/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options" |
NewerOlder