Updated installation guide: https://wiki.archlinux.org/index.php/installation_guide
# Listing all available layouts:
ls /usr/share/kbd/keymaps/**/*.map.gz
# Loading portuguese layout:
{ | |
"title": "Portuguese Layout Fixes ({}, \\|, ~^, ºª, +*)", | |
"rules": [ | |
{ | |
"description": "Swap Command <-> Control (MANDATORY FOR ALL THE RULES)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_control" |
Updated installation guide: https://wiki.archlinux.org/index.php/installation_guide
# Listing all available layouts:
ls /usr/share/kbd/keymaps/**/*.map.gz
# Loading portuguese layout:
@echo off | |
setlocal ENABLEDELAYEDEXPANSION | |
set label=VOLUME_LABEL_HERE | |
set letter=VOLUME_LETTER_HERE | |
set dpvns="%TEMP%\dpvn.txt" | |
set dprls="%TEMP%\dprl.txt" | |
echo list volume>%dpvns% |
/** | |
* Simple function that looks for unique words prefixed by something and prints them sorted as a TypeScript union | |
* Usage: getPrefixedNamesAsUnion(`.icon-alert{color: white}.icon-arrow{color: red}`, '.icon-'); | |
* Output: 'alert' | 'arrow' | |
*/ | |
getPrefixedStringsAsUnion = (str, prefix) => { | |
const escapedPrefix = prefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | |
const matches = [...str.matchAll(RegExp(`(?<=${escapedPrefix})[a-zA-Z0-9-_]+`, 'g'))].map((s) => s[0]); | |
const sortedUniqueStrings = [...new Set(matches)].sort((a, b) => a.localeCompare(b)); |
// Paste it on the console, while in: https://www.w3schools.com/colors/colors_names.asp | |
const colors = [...document.querySelectorAll('.colornamespan')].map((el) => el.textContent.toLowerCase()) | |
const union = [...colors].reduce((acc, name) => `${acc}| '${name}'\n`, ''); | |
console.log(union); |
// Paste it on the console, while in: https://www.w3schools.com/colors/colors_names.asp | |
const colors = [...document.querySelectorAll('.colornamespan')].map((el) => el.textContent.toLowerCase()) | |
const enumString = 'export enum HtmlColor {\n' + colors.map((color) => `\t${color} = '${color}'`).join(',\n') + ',\n}'; | |
console.log(enumString); |
These snippet are used in the following articles:
2mdn.net | |
2975c.v.fwmrm.net | |
ad-g.doubleclick.net | |
ad.doubleclick.net | |
ad.mo.doubleclick.net | |
ad.youtube.com | |
ads.doubleclick.net | |
ads.youtube.com | |
adservice.google.com | |
analytic-google.com |
TypeScript, React & Node snippets.