Select list items in React
Solution for https://jsfiddle.net/mladylukas/9qmusLok/
Getting started
-
Clone this repository
-
Run any local development http server like VS Code Live Server or Node live-server:
Solution for https://jsfiddle.net/mladylukas/9qmusLok/
Clone this repository
Run any local development http server like VS Code Live Server or Node live-server:
// Dynamic function arguments currying in TypeScript | |
// - For functions with any fixed arguments it keeps currying the function | |
// until all fixed arguments are provided, then returns the result | |
// - For functions with dynamic arguments only it keeps currying the function | |
// as long as the call provides any spices, otherwise returns the result | |
// - Source: https://gist.github.com/iki/6472c0775cc0847fc667c01524cafa6b | |
type Args = readonly unknown[] | |
type Func<A extends Args = any[], R = any> = (...args: A) => R | |
type Slices<A extends Args, I extends Args = []> = A extends readonly [infer F, ...infer R] |
const hide = (s: string) => '*'.repeat(s.length); | |
const hideEachSecondMatch = (_match: string, ...matches: string[]) => | |
matches | |
.slice(0, -2) | |
.map((m, i) => (i % 2 ? hide(m) : m)) | |
.join(''); | |
// Hide all characters in email name, except first and last character | |
// FIXME: Better hide at least one character for 1-2 character names | |
const hideEmail = (email: string, options?: { domain?: boolean }) => | |
email.replace( |
# Format: https://git-scm.com/docs/gitignore#_pattern_format | |
*.json | |
*.yaml | |
.DS_Store | |
*.log | |
*.log.* | |
/.*/ |
version: '3.7' | |
services: | |
whoami: | |
image: jwilder/whoami | |
ports: | |
- 127.0.0.1:7000:8000 | |
cors: |
FROM alpine | |
WORKDIR /data | |
COPY . . | |
CMD ls -l /data |
# See https://help.github.com/ignore-files/ for more about ignoring files. | |
# logs | |
*.log* | |
# tools settings and other hidden directories | |
/.*/ |
// ==UserScript== | |
// @name Medium: remove location hash | |
// @namespace http://efcl.info/ | |
// @description Remove location hash from medium | |
// @include https://medium.com/* | |
// @include https://uxdesign.cc/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
@echo off | |
setlocal enableextensions | |
::: echo === "%~f0" %* >&2 | |
set vcArgs=%* | |
set vcVersions=14 11 10 | |
call :poparg vcArgs vcVersions 10 10 %1 && shift | |
call :poparg vcArgs vcVersions 11 11 %1 && shift |
'use strict'; | |
var gulp = require('gulp'); | |
var path = require('path'); | |
var CWD = path.resolve('.'); | |
var API_SPEC = path.resolve(CWD, '../api/api.raml'); | |
var API_DEST = path.resolve(CWD, '../server/static/docs/api'); | |
var API_HTML = 'index.html'; |