- Necessary / Szükséges
- Functional / Funkcionális
- Analytics / Analítika
- Performance / Teljesítmény
- Advertising (Targeting) / Hirdetés
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 | |
DUMP_FILE="/home/user/product-attr-debug/$(date --utc +%F).product" | |
TOTAL="$(wp wc product list --format=count)" | |
for PAGE in $(seq 1 $(( (TOTAL+99) / 100 ))); do | |
wp wc product list --page=${PAGE} --fields=id,attributes >>"${DUMP_FILE}" | |
done |
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
# List repository origins | |
apt-cache policy | sed -n -e 's#^\s\+release .*o=\([^,]\+\).*#\1#p' | |
# Download all package (cache) | |
aptitude search -F "%p" "?origin(${ORIGIN})" | xargs -- apt-get install --download-only |
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
<?php | |
function build_url(string $host, array $segments = [], array $parameters = []): string | |
{ | |
return sprintf( | |
'https://%s/%s?%s', | |
idn_to_ascii($host), | |
implode('/', array_map('urlencode', $segments)), | |
http_build_query($parameters, '', '&') | |
); |
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://translate.google.com/ | |
Array.from(document.querySelectorAll("[role=listbox][aria-labelledby=ucj-4] [role=group] [role=option][data-language-code]")).map(elem => elem.getAttribute("data-language-code")).join(","); |
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
jq -r 'paths(scalars) as $p | ($p | join(".")) + " = " + (getpath($p)|tostring)' |
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
#!/usr/bin/env php | |
<?php | |
declare(strict_types=1); | |
const INDENT_CHAR = ' '; | |
const INDENT_SIZE = 4; | |
const END_OF_LINE = "\n"; | |
function exitWith(int $exitStatus, string $message): void |
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
<?php | |
namespace Grammar\Hungarian; | |
class DefiniteArticle | |
{ | |
const CONSONANTS = [ | |
'0', | |
'2', | |
'3', |
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 | |
# File with a string of UTF-8 characters | |
FILE="$1" | |
paste <(cat "${FILE}" | iconv -f UTF-8 -t UNICODE | hexdump -s 2 -e '1/2 "U+%04X\n"') <(grep -o '.' "${FILE}") \ | |
| sort |
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 | |
REDIS_DB="0" | |
QUEUE_REDIS_KEY="app_name_database_queues:default:delayed" | |
DB_NAME="sql_db_name" | |
redis() | |
{ | |
redis-cli -n "${REDIS_DB}" --raw "$@" | |
} |
NewerOlder