Based on https://busylog.net/telnet-imap-commands-note/
- -k -- don't verify certificate (optional)
- -n -- use .netrc for username and password (optional)
- -X -- request to send to server
Based on https://busylog.net/telnet-imap-commands-note/
#!/bin/bash | |
AWS_REGION="--region XXX_REGION" | |
AWS_PROFILE="--profile XXX_PROFILE" | |
LOG_GROUP="XXX_YOUR_LOG_GROUP" | |
LOG_STREAM="$(whoami)-$( date "+%Y%m%d-%H-%M-%S")" | |
aws logs create-log-stream --log-group-name $LOG_GROUP --log-stream-name $LOG_STREAM $AWS_REGION $AWS_PROFILE |
#!/bin/bash | |
set -e | |
if [[ "$#" -lt 1 ]]; then | |
echo "Usage: $0 <hostname or IP address>" | |
exit | |
fi | |
host="$1" |
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
#!/bin/sh | |
container=$1 | |
pass=$2 | |
if [ -z "$container" ] || [ -z "$pass" ]; then | |
echo "usage: $0 container newRootPassword" | |
exit | |
fi | |
mysql_image=$(docker inspect $container --format "{{ .Config.Image }}") |
<?php | |
/** | |
* Benchmarks BulkInserter at various batch sizes. | |
* | |
* Before running this script, make sure to: | |
* | |
* - set your PDO parameters in this file | |
* - run composer install | |
* - import setup.sql into your database |
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ | |
x11vnc |
[client-server] | |
port = 3306 | |
socket = /run/mysqld/mysqld.sock | |
[client] | |
[mysqld] | |
user = mysql | |
pid-file = /run/mysqld/mysqld.pid | |
basedir = /usr |
#!/usr/bin/env run-cargo-script | |
//! For the shebang to work, do a `cargo install cargo-script` first. | |
//! | |
//! ```cargo | |
//! [dependencies] | |
//! dkregistry = "0.1" | |
//! hyper = "0.10" | |
//! hyper-rustls = "0.6" | |
//! serde_json = "1" |