- c: Read to the newline as the module name, module. Read the next line as the object name, object. Push module.object onto the stack.
- (: Insert a marker object onto the stack. For our purpose, this is paired with t to produce a tuple.
- t: Pop objects off the stack until a ( is popped and create a tuple object containing the objects popped (except for the () in the order they were /pushed/ onto the stack. The tuple is pushed onto the stack
- S: Read the string in quotes up to the newline and push it onto the stack.
- R: Pop a tuple and a callable off the stack and call the callable with the tuple as arguments. Push the result onto the stack.
- .: End of the pickle.
This file contains hidden or 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 | |
| $passphrase = 'some-passphrase'; | |
| $text = 'Hello world!'; | |
| $method = 'AES-256-CBC'; | |
| // passphrase | |
| $passphrase = hash('sha256', $passphrase, true); |
This file contains hidden or 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 |
- https://nextjs.org/
- Hashicorp
- GitHub
- https://docusaurus.io/
- https://nanoc.app/
- Gitlab
- Prometheus
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |