mainfont: DejaVuSerif.ttf sansfont: DejaVuSans.ttf monofont: DejaVuSansMono.ttf
mainfontoptions:
- BoldFont=DejaVuSans-Bold.ttf
- ItalicFont=DejaVuSans-Oblique.ttf
lang: ru-RU
| // sample of using POCO's Thread | |
| #include "Poco/Runnable.h" | |
| #include "Poco/Thread.h" | |
| #include <iostream> | |
| using namespace std; | |
| class Worker:public Poco::Runnable{ | |
| public: |
| apt update | |
| apt install -y pgxnclient | |
| pgxn install pg_repack | |
| #You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application. | |
| apt install -y postgresql-server-dev-9.5 | |
| apt install -y ca-certificates | |
| apt install -y build-essential |
| /* | |
| слегка усложнил задачу, чтобы были пересечения | |
| идею про два счетчика вспомнил из какой-то сортировки | |
| логика полностью аналогична питоновской | |
| */ | |
| package main | |
| import "fmt" | |
| func main() { |
| #!/bin/bash | |
| # sudo crontab -e | |
| # @reboot /home/dizcza/Programs/checkwifi.sh | |
| # sudo update-rc.d cron defaults | |
| /bin/sleep 30 | |
| while true; do | |
| /usr/bin/wget -T5 -q --spider google.com |
| #!/bin/bash | |
| echo 'removing docker services...' | |
| docker service ls | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt);\ | |
| do docker service rm $line; \ | |
| done; rm tmp.txt; \ | |
| echo 'removing docker containers...'; \ | |
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt);\ | |
| do docker kill $line; \ | |
| docker update --restart=no $line; \ |
| # todo: clean utf chars with tr | |
| find -name '*.html' -exec html2text {} \; | tr -s '[[:punct:][:space:]]' '\n' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -bnr > ~/temp/words.txt |
| #!/bin/bash | |
| # en: an example of killing background tasks using ctrl+c from bash | |
| # useful when you need to start/kill a bunch of services | |
| # ru: пример работы с убиваемыми по ctrl-c фоновыми задачами в баш-скрипте | |
| # полезно, когда надо перезапускать много задач в фоне, например серверов | |
| function ctrl_c() { # trap ctrl-c and call ctrl_c() | |
| echo "** Trapped CTRL-C" | |
| arr=("$@") #take first arg, it's an array | |
| for i in "${arr[@]}"; | |
| do |
| # (this script works best with --anticache) | |
| # run it like this: mitmdump -q -s ~/b/mitm/replace.py | |
| from mitmproxy import ctx, http | |
| import re | |
| DPREFIX = '[DEBUG]> ' # stupid | |
| """ | |
| Dict of url regexps with content-type matching and replacement pairs | |
| I would add regexp flags as a third element of replacement list |
mainfont: DejaVuSerif.ttf sansfont: DejaVuSans.ttf monofont: DejaVuSansMono.ttf
mainfontoptions:
lang: ru-RU
| #!/bin/bash | |
| #usage: ./tls.sh domains.txt | |
| ##domains.txt: | |
| #google.com | |
| #cloudflare.com | |
| # ...etc |