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
function buildPascalTriangleLevel( arr ) { | |
if ( arr == undefined ) { | |
arr = []; | |
} | |
if ( arr.length == 0 ) { | |
arr.push([1]); | |
} | |
else { | |
prevLevel = arr[arr.length-1]; | |
let level = []; |
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
hAP - home AP | |
wAP - wall AP | |
cAP - ceiling AP | |
wsAP - wall socket AP | |
mAP - mini AP | |
ltAP - LTE AP | |
CRS - Cloud router switch |
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
//a fizetos tartalmak elrejtese a hvg.hu oldalon. ma 20240824 | |
const elements = document.querySelectorAll('.hvg360-icon'); | |
elements.forEach(element => { | |
// Megkeressük a szülőelemet egy másik osztállyal | |
const parent = element.closest('.articleitem, .articlelist-element'); | |
if (parent) { | |
// A szülőelem display tulajdonságának none-ra állítása | |
parent.style.display = 'none'; |
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
sudo find / -maxdepth 4 -not \( \( -path /proc -o -path /sys -o -path /dev -o -path /run \) -prune \) -type d -exec findmnt {} \; |
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
function mlog($msg, $level=null) { | |
$date = new DateTime(); | |
$date->setTimezone( new DateTimeZone('Europe/Budapest')); | |
$dt = $date->format('Y.m.d H:i:s'); | |
//$clientip=' ['.CLIENT_IP.']'; | |
$lvl = $level ? " [$level]":""; | |
$cip = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']); | |
$logline = $dt.' [.$cip.]'.$lvl.': '.$msg.PHP_EOL; | |
//$logline.=var_export($_SERVER,1); |
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
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com'); |
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
If 2fa is enabled on github switch to ssh instead of https on linux | |
1. generate an ssh keypair on your linux box | |
ssh-keygen -t {rsa|dsa} | |
2. add the public key to github: profile - settings - ssh keys | |
3. switch from https to ssh | |
Check your repo remote: |
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
# letsencrypt wildcard and root certificate create.sh | |
sudo certbot certonly --manual --preferred-challenges=dns --email user@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.mydomain.com -d mydomain.com |
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
src=user@remote.com:/storage/mail | |
dst=/systems/dandre.hu/mail/vmail/ | |
backdir=/systems/backups/ | |
dn=example.com | |
time for ln in `ls -1 /var/vmail/$dn/` ; do | |
echo $ln; | |
time rsync -az --delete --backup --backup-dir=$backdir/$dn/$ln --info=progress2 -e "ssh -p 22" $src/$dn/$ln/Maildir $dst/$dn/$ln/ | |
done |
NewerOlder