Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
1) Concatenate a list of videos into one | |
ffmpeg -f concat -safe 0 -i tojoin.txt -c copy output.mp4 | |
// Format of tojoin.txt: | |
file 'file0.MP4' | |
file 'file1.MP4' | |
file 'etc.. | |
2) Scale down 4k video to |
import { createHash } from "crypto"; | |
import fs from "fs"; | |
import fsp from "fs/promises"; | |
import path from "path"; | |
import https from "https"; | |
import { PassThrough } from "stream"; | |
import type { Readable } from "stream"; | |
import type { LoaderFunction } from "remix"; | |
import sharp from "sharp"; | |
import type { Request as NodeRequest } from "@remix-run/node"; |
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
export const chaosTestStrings = (): void => { | |
const textNodes = getAllTextNodes(document.body); | |
for (const node of textNodes) { | |
const textNodeLength = node.textContent ? node.textContent.length : 0; | |
if (node.textContent === null) { | |
return; | |
} | |
if (node.parentElement instanceof Element) { | |
if (node.parentElement.dataset.originalText === undefined) { |
// Please use the package https://github.com/chmike/domain as is it maintained up to date with tests. | |
// checkDomain returns an error if the domain name is not valid. | |
// See https://tools.ietf.org/html/rfc1034#section-3.5 and | |
// https://tools.ietf.org/html/rfc1123#section-2. | |
func checkDomain(name string) error { | |
switch { | |
case len(name) == 0: | |
return nil // an empty domain name will result in a cookie without a domain restriction | |
case len(name) > 255: |
I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
This easy widget let's you see upcoming matches of your favourite football team.
competitionId
variable (line 4) with your competition idteamId
variable (line 5) with your favourite team id{ | |
"Insert a function": { | |
"prefix": "f", | |
"body": [ | |
"function $1($2) {\n $0\n}\n" | |
], | |
"description": "Insert a function" | |
}, | |
"const arrow": { | |
"prefix": "c>", |
{ | |
getters: { | |
brandIcon() { | |
return (text, defaultIcon) => { | |
const isBrand = brandIcons.includes(text.toLowerCase()); | |
if (isBrand) { | |
return `fa-${text.toLowerCase()}`; | |
} | |
return `fa-${defaultIcon}`; | |
}; |