All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
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
## installation openldap with backend mysql | |
sudo apt update && sudo apt upgrade -y && sudo reboot | |
sudo apt install mysql-server unixodbc make gcc libmysqlclient-dev unixodbc-dev groff ldap-utils | |
## mysql login as root | |
sudo mysql -u root | |
CREATE DATABASE ldap | |
CREATE USER 'ldap'@'%' IDENTIFIED BY 'S3cureP4ssw0rd$'; | |
GRANT ALL PRIVILEGES ON ldap.* TO 'ldap'@'%'; |
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 | |
# Create a full or incremental xtrabackup | |
# In the cron job, set it like below: | |
## xtrabackup weekly full backup (Saturday, 9 PM UTC == Sunday, 5 AM MYT) | |
## 0 21 * * 6 /root/backups/scripts/xtrabackup.sh full > /dev/null | |
## xtrabackup daily incremental backup (Sunday->Friday, 9 PM UTC == Monday->Saturday, 5 AM MYT) | |
## 0 21 * * 0-5 /root/backups/scripts/xtrabackup.sh incremental > /dev/null | |
# Note: | |
## - For every full backup taken, all created incremental backups will be deleted. |
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
// Brainfuck Fibonacci calculation | |
// Forked from pablomm/fibonacci_bf | |
// Forked to add numeric value output Comments added to allow reverse engineering | |
+> // Set #1 to 1; Shift to #2 | |
+> // Set #2 to 1l Shift to #3 (CLP) | |
<< // Shift to #1 for output loop of #1 and #2 | |
[ | |
++++++++++ ++++++++++ ++++++++++ ++++++++++ ++++++++ . ---------- ---------- ---------- ---------- --------> // Add 48; Output ASCII; Decrease 48: shift right 1 | |
>>>>>>>>>> ++++++++++ ++++++++++ ++++++++++ ++ . ---------- ---------- ---------- -- <<<<<<<<<< // Shift to #10; Outpur ASCII 32 as SPACE |
This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.
The script will create backups using tar
with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.
To create backup script that will be executed every day we can create backup script in /etc/cron.daily/
folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:
touch /etc/cron.daily/pvehost-backup
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
# Change Swapfile: | |
swapoff -v /dev/pve/swap | |
lvm lvresize /dev/pve/swap -L +48G | |
mkswap /dev/pve/swap | |
swapon -va | |
dd if=/dev/zero of=/dev2/swap bs=1M count=49152 | |
mkswap /dev2/swap | |
swapon -v /dev2/swap |
Moved to git repository: https://github.com/aliesbelik/load-testing-toolkit
Tools to benchmark & load-test your code or services
- apachebench (ab) - Standalone apachebench (ab), Apache HTTP server benchmarking tool.
C
- httperf - A tool for measuring web server performance.
C
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
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <assert.h> | |
#define STACK_MAX 100 | |
#define CODE_SIZE (2 * 1024 * 1024) |
NewerOlder