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 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 |
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) |
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
pragma solidity ^0.4.24; | |
contract Tree { | |
struct Node { | |
bytes32 name; | |
bytes32 parent; | |
bytes32 data; | |
bytes32[] nodes; | |
} |
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'@'%'; |
NewerOlder