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
@mixin recolor($color: #000, $opacity: 1) { | |
$r: red($color) / 255; | |
$g: green($color) / 255; | |
$b: blue($color) / 255; | |
$a: $opacity; | |
// grayscale fallback if SVG from data url is not supported | |
$lightness: lightness($color); | |
filter: saturate(0%) brightness(0%) invert($lightness) opacity($opacity); |
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
// This function is used for Vite.js build in use with badly exported CommonJS modules | |
// @see https://github.com/vitejs/vite/issues/2139 | |
function interopDefault<T>(value: T): T { | |
// all "vite build" modes (preview mode is in DEV mode) | |
return import.meta.env.PROD || import.meta.env.MODE === "preview" ? (value as any).default : value; | |
} | |
export { interopDefault }; |
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
https://chocolatey.org/packages/chromium/#versionhistory | |
https://omahaproxy.appspot.com/ => Branch Base Position | |
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/ | |
https://developers.google.com/web/updates/2020 |
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
C:\msys64\msys2_shell.cmd -defterm -mingw64 -no-start -here -full-path |
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
/* --- Strategies --- */ | |
//=> network ? save : cache | |
async function networkFirst(cacheName, fetchEvent) { | |
const request = fetchEvent.request; | |
let fetchResponse; | |
return fetch(request) | |
.then(response => toCache(cacheName, request, fetchResponse = response)) | |
.then(response => 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
# remove sound | |
ffmpeg -i input.mp4 -c copy -an output.mp4 | |
# export first frame | |
ffmpeg -i input.mp4 -ss 0 -vframes 1 poster.png | |
# Resize | |
ffmpeg -i input.mp4 -filter:v scale=-1:720 -c:a copy output.mp4 | |
ffmpeg -i input.mp4 -filter:v scale=-1:720 -c:a copy output.mp4 |
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
[#ftl] | |
[#-- @implicitly included --] | |
[#-- @ftlvariable name="content" type="info.magnolia.jcr.util.ContentMap" --] | |
[#-- @ftlvariable name="ctx" type="info.magnolia.context.MgnlContext" --] | |
[#-- @ftlvariable name="def" type="info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition" --] | |
[#-- @ftlvariable name="state" type="info.magnolia.cms.core.AggregationState" --] | |
[#-- @ftlvariable name="i18n" type="info.magnolia.freemarker.MessagesWrapper" --] | |
[#-- @ftlvariable name="i18nAuthoring" type="info.magnolia.freemarker.MessagesWrapper" --] | |
[#-- @ftlvariable name="cms" type="info.magnolia.templating.freemarker.Directives" --] |
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
Show hidden characters
{ | |
"cmd": ["tsc", "-p", "jsconfig.json"], | |
"file_regex": "^(.+?)\\((\\d+),(\\d+)\\): (.+)$", | |
"working_dir": "${project_path:${folder}}", | |
"selector": "source.js" | |
} |
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
import time | |
from functools import wraps | |
# Use this function only if you need decorator parameters | |
def howmuchtime(limit=None): | |
def decorator(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
start = time.time() |
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
# See https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html | |
# csrutil disable and enable (Cmd+R on reboot) | |
# https://furbo.org/2015/01/19/clearing-the-icon-services-cache-in-yosemite/ | |
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; | |
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \; | |
sudo rm -rf /Library/Caches/com.apple.iconservices.store |
NewerOlder