[...document.querySelectorAll('span')]
.filter(el => /^\d+$/.test(el.textContent.trim()))
.map(el => el.textContent.trim())
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| """List GitHub organization teams and print matching team names. | |
| Usage: | |
| export GITHUB_TOKEN="<token-with-read:org>" | |
| python3 list_github_org.py --org your-org-name find-teams-with-members --user-names user1,user2 | |
| Notes: | |
| - For private org/team visibility, the token needs at least `read:org` scope. | |
| - Fine-grained tokens must include organization members/teams read permissions. |
This is an awesome list or resources on sashiko, kantha, visible mending and other related techniques.
- basic concepts of Japanese aesthetics in Ukrainian
This file contains hidden or 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
| #!/usr/bin/env zsh | |
| ## Save initial state | |
| exec {saved_stdin}<&0 # save initial stdin | |
| exec {saved_stdout}>&1 # save initial stdout | |
| ## Redirect initial stdin and stdout to terminal |
This file contains hidden or 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
| # Usage: compare-locales LC_TIME POSIX de_DE.UTF-8 'date' | |
| function compare-locales() { | |
| local -r category="$1" | |
| local -r locale1="$2" | |
| local -r locale2="$3" | |
| local -r command="$4" | |
| #echo "=== Comparing '$command' in $locale1 and $locale2 ===" | |
| printf "Output in %-15s %s\n" "$locale1:" "$( | |
| export "$category=$locale1" |
This file contains hidden or 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
| # Calculate the size of a git commit in bytes. | |
| function git-commit-size() { | |
| # This script calculates the size of a git commit in bytes. | |
| # Usage: git-commit-size.sh <commit hash> | |
| # | |
| # Example: | |
| # git-commit-size.sh 1234567 | |
| # | |
| # Output: | |
| # The total size of the commit in bytes, formatted with thousands separators. |
This file contains hidden or 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
| # List running EC2 instances filtered by `Name` tag | |
| # | |
| # params: | |
| # $1 - optional string. Filters output by instances with `Name` tag containing the string | |
| function aws-ec2() { | |
| aws ec2 describe-instances \ | |
| --filter "Name=instance-state-name,Values=running" \ | |
| --filter "Name=tag:Name,Values=*$1*" \ | |
| --query "Reservations[].Instances[].{ | |
| id: InstanceId, |
This file contains hidden or 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/sh | |
| item=$1 | |
| field=$2 | |
| bw get item "$1" \ | |
| | jq --raw-output '.fields[] | select(.name == "'"$field"'") | .value' |
This file contains hidden or 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
| ## Global vars | |
| export LESS='--buffers=128 --HILITE-UNREAD --ignore-case --LONG-PROMPT --max-back-scroll=15 --no-init --quiet --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --status-column --tabs=4 --window=-4' | |
| export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' | |
| export FZF_DEFAULT_OPTS='--height 50% --ansi --info=inline' | |
| export EDITOR='/usr/local/bin/nvim' | |
| ## zinit | |
| source ~/.zinit/bin/zinit.zsh |
This file contains hidden or 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
| def foo(Object... args) { | |
| def normalizedArgs = [] | |
| if (args != null) { | |
| if (args.size() == 1) { | |
| normalizedArgs << args[0] | |
| } else { | |
| normalizedArgs += args.toList() | |
| } | |
| } | |
| print('foo(varargs): ' + normalizedArgs.size() + ': ') |
NewerOlder