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
" The default vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <Bram@vim.org> | |
" Last change: 2016 Sep 02 | |
" | |
" This is loaded if no vimrc file was found. | |
" Except when Vim is run with "-u NONE" or "-C". | |
" Individual settings can be reverted with ":set option&". | |
" Other commands can be reverted as mentioned below. |
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
// `ping` backend from client via websocket | |
// frontend code | |
// ping every 60 seconds or so | |
ping.send({ | |
"user": userid, | |
"time": new Date.now() | |
}); |
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
#!/bin/sh | |
# | |
# get os type | |
# | |
get_os() { | |
if [ -z $OSTYPE ]; then | |
OSTYPE=$(uname | tr '[:upper:]' '[:lower:]') | |
fi |
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; |
NewerOlder