- https://nextjs.org/
- Hashicorp
- GitHub
- https://docusaurus.io/
- https://nanoc.app/
- Gitlab
- Prometheus
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
# create private key with passphrase | |
openssl genrsa -out config/jwt/private.pem -aes256 4096 | |
# Write public key | |
openssl rsa -pubout -in private.pem -out public.pem |
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
# format in luks | |
sudo cryptsetup luksFormat --hash=sha512 --key-size=512 /dev/sda7 | |
# create mapping | |
sudo cryptsetup open --type=luks /dev/sda7 SECURED | |
# check mapping | |
sudo cryptsetup -v status SECURED | |
# format partition |
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
SET GLOBAL slow_query_log = 'ON'; | |
select @@long_query_time; | |
SET GLOBAL long_query_time = 5; | |
select @@slow_query_log_file; | |
SET GLOBAL slow_query_log_file = '/path/filename'; | |
SET GLOBAL slow_query_log = 'OFF'; |
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
git clone https://github.com/RinCat/RTL88x2BU-Linux-Driver | |
make | |
sudo make install | |
sudo modprobe 88x2bu | |
#### | |
git clone https://github.com/morrownr/88x2bu | |
sudo ./install-driver.sh |
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
<?php | |
function test($timeOffsetMS) | |
{ | |
$modification = sprintf('-%s msec', $timeOffsetMS); | |
echo 'Modificator: ' . $modification . PHP_EOL; | |
$time = 1604503053.0000; // microtime(true); | |
$timeString = sprintf('%0.6F', $time); | |
echo 'Source: ' . $timeString . PHP_EOL; |
2020-01-01 12:13:14 8
2020-01-01 12:13:14 7
2020-01-01 12:13:14 8
2020-01-01 12:13:14 9
cat file | awk -F' ' '{split($1, date, "-"); print date[1] "-" date[2] "\t" $3}'
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/env bash | |
# First configure aws cli to authenticate on aws. | |
# See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-creds | |
CURRENT_DIR=$(dirname $(readlink -f $0)) | |
CURRENT_DATE=$(date +%Y%m%d%H%M) | |
source .env # path to MySQL credentials | |
mysqldump -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB > /tmp/$CURRENT_DATE.sql |
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
## Connection 1 | |
1. begin | |
3. delete from table where id = 1; | |
5. insert into table values (1); | |
## Connection 2 | |
2. begin |
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
# generate cert from another host with validation by dns TXT record | |
certbot certonly --manual --preferred-challenges dns |