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://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern | |
ESCAPED_REPLACE=$(printf '%s\n' "$REPLACE" | sed -e 's/[\/&]/\\&/g') | |
# Now you can use ESCAPED_REPLACE in the original sed statement | |
sed "s|KEYWORD|${ESCAPED_REPLACE}|g" | |
if you have "base64 -w 0" string (even multiline), it does not needs to be escaped |
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
check first | |
pacman -Qk 2>/dev/null | awk -F: '! /0 missing files$/ {print $1}' | xargs pacman -S | |
then use `--noconfirm` as last option |
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
see as well | |
https://gist.github.com/mator/783c6672158bd0d584b0a6c87f1d681c | |
running on macbook pro, 16" 2023, Apple M2 Max, Ventura 13.5 | |
% brew install hashcat | |
... |
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
read-only доступ для пользователя readonly до базы db1 для PostgreSQL версии меньше чем 14.x: | |
\c db1 | |
CREATE USER readonly WITH PASSWORD 'xxx'; | |
GRANT CONNECT ON DATABASE db1 TO readonly; | |
GRANT USAGE ON SCHEMA public TO readonly; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly; | |
с версии 14.x появилась возможность использовать predefined role "pg_read_all_data" (заменяющая последние две команды SQL: USAGE/SELECT) : | |
GRANT pg_read_all_data TO userA; |
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
Testing Nvidia Tesla T4 with hashcat under Centos Linux 7 | |
Actually, the server has 2 tesla's installed, and first one is occupied with the task, | |
so we testing and showing info on the second tesla. | |
linux: | |
``` | |
$ cat /etc/centos-release | |
CentOS Linux release 7.9.2009 (Core) | |
$ uname -a |
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
mator@ttip:/1/mator/stress-ng$ ./stress-ng --version | |
stress-ng, version 0.12.09 (gcc 10.2, sparc64 Linux 5.13.0-rc3-00261-g97e5bf604b7a) 💻🔥 | |
mator@ttip:/1/mator/stress-ng$ ./stress-ng --sequential -1 --oomable --pathological --timeout 15s --timestamp -v --metrics-brief | |
stress-ng: 01:19:53.69 debug: [1482450] system: Linux ttip 5.13.0-rc3-00261-g97e5bf604b7a #222 SMP Fri May 28 18:27:24 MSK 2021 sparc64 | |
stress-ng: 01:19:53.69 debug: [1482450] RAM total: 33.5G, RAM free: 32.6G, swap free: 724.2M | |
stress-ng: 01:19:53.69 debug: [1482450] 16 processors online, 256 processors configured | |
... |
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
mator@ttip:/1/mator/stress-ng$ git desc | |
V0.12.06-45-gef68f05b | |
$ ./stress-ng --sequential 2 --timeout 90s --pathological --metrics -v | |
stress-ng: debug: [4015818] system: Linux ttip 5.12.0-rc7 #206 SMP Mon Apr 12 14:10:06 MSK 2021 sparc64 | |
stress-ng: debug: [4015818] RAM total: 33.5G, RAM free: 32.6G, SWAP free: 731.6M | |
stress-ng: debug: [4015818] 24 processors online, 256 processors configured | |
stress-ng: info: [4015818] apparmor: stressor will be skipped, AppArmor is not available | |
stress-ng: info: [4015818] binderfs stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor | |
stress-ng: info: [4015818] chroot stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor |
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
-- Journal begins at Mon 2020-10-12 23:40:31 MSK, ends at Mon 2020-12-14 17:36:21 MSK. -- | |
Dec 14 13:48:15 kernel: PROMLIB: Sun IEEE Boot Prom 'OBP 4.38.17 2019/01/25 08:22' | |
Dec 14 13:48:15 kernel: PROMLIB: Root node compatible: sun4v | |
Dec 14 13:48:15 kernel: Linux version 5.10.0 (mator@ttip) (gcc (Debian 10.2.1-1) 10.2.1 20201207, GNU ld (GNU Binutils for Debian) 2.35.1) #155 SMP Mon Dec 14 13:32:10 MSK 2020 | |
Dec 14 13:48:15 kernel: printk: bootconsole [earlyprom0] enabled | |
Dec 14 13:48:15 kernel: ARCH: SUN4V | |
Dec 14 13:48:15 kernel: Ethernet address: 00:14:4f:fa:06:f2 | |
Dec 14 13:48:15 kernel: MM: PAGE_OFFSET is 0xfff8000000000000 (max_phys_bits == 47) | |
Dec 14 13:48:15 kernel: MM: VMALLOC [0x0000000100000000 --> 0x0006000000000000] | |
Dec 14 13:48:15 kernel: MM: VMEMMAP [0x0006000000000000 --> 0x000c000000000000] |
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
setting domain perf-counters to strand, fixes issue: | |
$ ldm set-domain perf-counters=strand ttip | |
Linux LDOM boot logs: | |
$ dmesg | |
[ 0.000017] PROMLIB: Sun IEEE Boot Prom 'OBP 4.38.17 2019/01/25 08:22' | |
[ 0.000020] PROMLIB: Root node compatible: sun4v | |
[ 0.000055] Linux version 5.9.0-4-sparc64-smp (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.0-19) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35.1) #1 SMP Debian 5.9.11-1 (2020-11-27) | |
[ 0.000349] printk: bootconsole [earlyprom0] enabled | |
[ 0.000394] ARCH: SUN4V |
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure --without-ncat --without-liblua --without-libssh2 --without-nping --without-zenmap --without-ndiff --without-openssl --enable-debug --no-create --no-recursion | |
## --------- ## | |
## Platform. ## |
NewerOlder