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://qit.tools/developer/cheat-sheet/unicode/languages/ | |
// https://www.alchemysoftware.com/livedocs/ezscript/Topics/Catalyst/Language.htm | |
// let languageNativeNames = new Intl.DisplayNames([lang], { type: "language" }); | |
// let languageNames = new Intl.DisplayNames(['en'], { type: "language" }); | |
[ | |
{ | |
"code": "aa", | |
"name": "Afar", | |
"native": "Afar", |
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/bash | |
# Script: create_archive.sh | |
# Description: This script creates a zip archive of the current directory, excluding files starting with '.DS_', and names the archive after the current directory. | |
# Assign the name of the current directory to the variable 'folder_name' | |
folder_name=$(basename "$PWD") | |
# Find files in the current directory and its subdirectories, excluding those whose names start with '.DS_', and zip them into an archive named after the current directory | |
find . -type f -not -name '.DS_*' -exec zip "$folder_name.zip" {} + |
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
bi | |
fu | |
ho | |
ky | |
uk | |
wn | |
xx | |
ass | |
bbw | |
nig |
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://jsfiddle.net/v8Lxazhr/ | |
function changeValue(isIncreasing) { | |
const valueElement = document.getElementById('valueElement'); | |
let currentValue = parseInt(valueElement.innerText); | |
if (isIncreasing) { | |
currentValue++; | |
valueElement.style.color = 'green'; | |
} else { |
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 type { QwikIntrinsicElements } from "@builder.io/qwik"; | |
import { component$, Slot } from "@builder.io/qwik"; | |
export default component$( | |
<C extends keyof QwikIntrinsicElements>(props: PolyProps<C>) => { | |
const Component = (props.as ?? "div") as string; | |
return ( | |
<Component {...props}> | |
<Slot /> | |
</Component> |
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 { Info, DateTime } from "luxon"; | |
function generateMonthCalendar(dt: DateTime, locale = "en-US") { | |
const startOfMonth = dt.startOf("month"); | |
// Prepare an array to fill in the calendar | |
const calendar = []; | |
for (let i = 0; i < startOfMonth.weekday - 1; i++) { | |
calendar.push(" "); | |
} |
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
useOnDocument( | |
"readystatechange", | |
$(() => { | |
const id = setInterval(() => { | |
isMounted.value = true; | |
const dt = getTimeLuxon({ timeZone, locale: "en-US" }); | |
stateTime.value = noSerialize(dt) as DateTime & { | |
__no_serialize__: true; | |
}; | |
}, 1000); |
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
/* | |
That function make filter by this map. | |
[ | |
{ | |
"si": [ | |
{ | |
"millimeter": "0.001" | |
} | |
] |
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 { componentQrl, qrl } from "@builder.io/qwik"; | |
export const qwikSerialized = (dynamicImport, fn = "default") => { | |
return componentQrl(qrl(dynamicImport, fn)); | |
} | |
/* | |
import Stats from "~/components/widgets/Stats"; | |
import CallToAction from "~/components/widgets/CallToAction"; | |
import { qwikSerialized } from "~/utils/qwikSerialized"; |
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
/* | |
Locales | |
You can choose from many locales, including some (such as en) that let a single translation support multiple variations of a language (such as en_GB and en_US). | |
You can localize your extension to any locale that is supported by the Chrome Web Store. If your locale is not listed here, choose the closest alternative. For example, if the default locale of your extension is "de_CH", choose "de" in the Chrome Web Store. | |
*/ | |
const locales: { label: string; value: string }[] = [ | |
{ label: "العربية", value: "ar" }, |
NewerOlder