Getting all your repos with corresponding architecthre requires surprise amount of API shinnanigans!
Category: Web
-
Spam to aol.com
Some open relay spams a lot with this kind of messages:
Delivered-To: abondarenko@gmail.com Received: by 2002:aa6:c2c8:0:b0:16a:1e8a:2c54 with SMTP id i8csp1735690lkp; Fri, 17 Dec 2021 09:01:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYX2tMoVU+eJjTP1qslWMcUikk61IbaTmPrak3WWvb1fbofSlY0ftgYqX9WBAiH5rL/PIy X-Received: by 2002:a2e:bf1e:: with SMTP id c30mr3535718ljr.408.1639760491902; Fri, 17 Dec 2021 09:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639760491; cv=none; d=google.com; s=arc-20160816; b=Pp3pD2GTGMOH8vYn+zs+n31Y3/RsUhm8SrzMWHMf4MAqnnojNhRemwUANtHgYhjd/9 M9F2iuIpJkYkdd5SqyzP2623PIWs8ahgMoEWWU5s9exmqAhICUtDc0BODLwWpzw1pbYi +XoA0yQkL79W+wWdCnn2D+EGR1LCr2dxnrH4A3OgsTTXG573/yQ3fAxMvT/qdSTCHf+X VtaHKSEHgU5vkfo20EF6hKF9h46d/KyaMspGtr4XhVeUPgvl3EWf/LilXOnbcctYH+q7 Q2ys7jcbeyltrTxwhVhJAy0gUu2ozZvSYh1SqR5MeWSbIb5/ClGinRy5cg5nimLi2jig G2Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:date:subject:mime-version:from:references:message-id :in-reply-to:cc:sender:to; bh=NGzDzdcewllnPBsamgVTFKJA29B6AKbdLi/8YHAavI4=; b=TMnHqx8tOJuZqLu9T8zJeVqCHf7smy3gfUcaNpwZXAh/b+WUewtSpgMGFFCyq99Q1f onjlP1gOa8+bf6lFbke9NTi4lJIclGzgZpehfAuSoqYPvOZb6rxuJJG+CPDqYMtS68ah JGSbWjAxFMWfyBju3iapWIraB6JDIcK1zAKMdQnH6hD9CwFYpGw0LcDPSXGnYmu6ZdEv 28GPBTJEtT4jQ6aXuOSRX2fTxrZq2nnrR9CJ1L/qFnTfa1czf4VlCzRmfQUC6CFPPv78 0lOgK3/r3FxbYqqTYU9ugM25xNh3CxB720wTrYUZESOXjpXo2HXM2xlox6CLU1QDrt5F Mgzg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 95.216.139.147 is neither permitted nor denied by best guess record for domain of noreply.tye@kojmpwphuzgk.com) smtp.mailfrom=noreply.Tye@kojmpwphuzgk.com Return-Path: <noreply.Tye@kojmpwphuzgk.com> Received: from coinednotes.club (static.147.139.216.95.clients.your-server.de. [95.216.139.147]) by mx.google.com with ESMTP id p27si13564674lfa.84.2021.12.17.09.01.31 for <abondarenko@gmail.com>; Fri, 17 Dec 2021 09:01:31 -0800 (PST) Received-SPF: neutral (google.com: 95.216.139.147 is neither permitted nor denied by best guess record for domain of noreply.tye@kojmpwphuzgk.com) client-ip=95.216.139.147; Authentication-Results: mx.google.com; spf=neutral (google.com: 95.216.139.147 is neither permitted nor denied by best guess record for domain of noreply.tye@kojmpwphuzgk.com) smtp.mailfrom=noreply.Tye@kojmpwphuzgk.com Received: from app19.muc.ec-messenger.com (app19.muc.ec-messenger.com ) (envelope-from <g-3851351679-7322-354668012-1559235622088@bounce.news.mapp.com (g-3851351679-7322-354668012-1559235622088@bounce.news.mapp.com)>) by gp13mtaq123 (mtaq-receiver/2.20190311.1) with ESMTP id yA3jJ-_S5g8Z for <maizeseven@comcast.net>; Thu, 30 May 2019 19:00:22 +0200 Received: from www.takataka.gr (realshop.gr ) by uat.atnet.gr (Postfix) with ESMTPA id 24BF957C2E58 for <daily.fast@aol.com>; Wed, 29 May 2019 20:27:11 +0300 (EEST) To: <abondarenko@aol.com> Sender: support.S2quNYj43Z.673059 CC: <abondarenko@aol.com> In-Reply-To: <CADT5qSj0REQQpwKiW6P5cL27kFYMN9CKrxS2quNYj43Z46NH1Cu5OuqVwXww@nzv.Americans Urged To Take Advantage Of Today’s Low Rates> Message-ID: <ZF3lf1bGTw-Ct-Y9ADdPrxQfxtw8L0vHg-95.216.139.147@ismtpd0003p1iad1.sendgrid.net> References: <----=_Part_zxX5LNJYyq8_2925087682796.s-east-2.amazonawzxX5LNJYyq8@> Content-Type: multipart/Digest; boundary="----=_Part_zxX5LNJYyq8_2925087682796.s-east-2.amazonONj3L3voxQenV" From: "`V.i.v.a-loan`@#" <wmu2NhS-rxQfxtw8L0v-noReply@kojmpwphuzgk.com> MIME-Version: 2.0 Subject: Get_up.to-$15,000 just~in.time.for-Christmas!``357` Date: [Date] List-ID: <6417211.xt.local>
Google mail does not treat this as spam, but I can just drop all mail to abondarenko@aol.com. Interesting!
-
Let’s encrypt cert updates
Let’s encrypt is wonderful, but certificate are getting expired every 3 months. Since it’s a first time I need to renew them, I have done it manually. The tool authenticates you (by default) with special file created in the .well-know/acme-challenge directory of the root, so the blog engine should not interfere or rewrite anything and should not return it’s own 404 page. Historically my nginx.conf has lots of existing redirects and rules, I am too lazy to correct and simplify it, so simple
localtion ~ .well-known { allow all; }
does not work. And I am too lazy to figure out why it is so (bad for me). So the most simple way to renew certs for me is to switch to minimal config. Putting it here for the future reference.
user nginx; worker_processes 1; error_log /var/log/nginx/error.log; pid /run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; server_names_hash_bucket_size 128; index index.html index.htm; server { listen 80; listen [::]:80; server_name andreybondarenko.com; location / { root /var/www/; } } }
-
TOC and collapsible block samples
I am writing some tool for my daily work that produces fancy HTML page from RHEL, CentOS or Fedora log and config files, so it would be more easy to read them. Nothing special, just some bash scripts with sed, grep and awk that produce HTML with some CSS and JQuery.
- TOC I really liked: http://projects.jga.me/toc/ It’s very easy to use and implement, it just looking through the document for h1, h2, etc tags. Scope and what tags to look can be customized.
- Collapsible blocks sample: https://codepen.io/peternguyen/pen/hICga/
May be it would be yet another “log2html” framework in the end.
-
Interesing “feature” of the Mediawiki
Just have a bit digged in the Mediawiki, that is quite popular Wiki engine 🙂 Found out that the articles are located in the “prefix_text” table, with all the changes, obviously. So changes are being stored as a new copy of the article: if you have 100kb article and you need to save a change in 1 symbol, there would be 100kb growth (plus additional data) of the table. No wonder that the Wikipedia need new servers all the time! Cannot imagine size of their DBs.
-
Backuping mysql
Recently I have to backup mysql database on quite heavily loaded server and I wanted to make backup daily on one hand and I wanted them not to affect production on the other. DB size is more than 150 Gb, about 50k users daily.
First approach was ty try to simply run musqldump and see what would happen. Site was down right after the backup has begun. Then I have tried to nice the mysqldump with
/usr/bin/nice -n 10 ionice -c2 -n 7
The result was better, site was down at about 10% of the job. Next I add –single-transaction, that have solved about 95% of problems, still some time site was down, so I had to add -q option. The final command was:
/usr/bin/nice -n 10 ionice -c2 -n 7 /usr/bin/mysqldump --plugin-dir=/usr/lib/mysql/plugin --user=dbuser -h bd.lxc --port=3306 --all-databases --single-transaction -q|/bin/gzip > /var/bcp/backup-db-`/bin/date -I`.sql.gz