This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
## Find Available Target Editions | |
DISM.exe /Online /Get-TargetEditions | |
## Convert Server Standard 2019 Evaluation to Server Standard 2019 | |
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula | |
## How To Activate | |
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX | |
slmgr /skms [server]:[port] | |
slmgr /ato |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
// 1. Open the browser developper console on the network tab | |
// 2. Start the video | |
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL | |
// 4. Run: node vimeo-downloader.js "<URL>" | |
// 5. Combine the m4v and m4a files with mkvmerge | |
const fs = require('fs'); | |
const url = require('url'); | |
const https = require('https'); |
$ uname -r
BEGIN { | |
require 'net/http' | |
Net::HTTP.module_eval do | |
alias_method '__initialize__', 'initialize' | |
def initialize(*args,&block) | |
__initialize__(*args, &block) |
require 'cgi' | |
require 'json' | |
require 'active_support' | |
def verify_and_decrypt_session_cookie(cookie, secret_key_base) | |
cookie = CGI::unescape(cookie) | |
salt = 'encrypted cookie' | |
signed_salt = 'signed encrypted cookie' | |
key_generator = ActiveSupport::KeyGenerator.new(secret_key_base, iterations: 1000) | |
secret = key_generator.generate_key(salt)[0, ActiveSupport::MessageEncryptor.key_len] |
/home/deployer/site/shared/log/nginx-*.log { | |
weekly | |
missingok | |
rotate 10 | |
compress | |
delaycompress | |
notifempty | |
create 0640 deployer deployer | |
postrotate | |
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` |
#!/usr/bin/env bash | |
DUMP_PATH="/var/backup/mysql" | |
DB_NAME="db_name" | |
USER="backup" | |
PASSWORD="pass" | |
mysqldump -u$USER -p$PASSWORD $DB_NAME | gzip -c > $DUMP_PATH/$DB_NAME.$(date +'%s').sql.gz | |
cd $DUMP_PATH | |
rm -f $(ls -1t $DUMP_PATH | tail -n +200) |
#!/usr/bin/env bash | |
DUMP_PATH="/var/backup/mysql" | |
DB_NAME="db_name" | |
USER="backup" | |
PASSWORD="pass" | |
mysqldump -u$USER -p$PASSWORD $DB_NAME | gzip -c > $DUMP_PATH/$DB_NAME.$(date +'%s').sql.gz | |
cd $DUMP_PATH | |
rm -f $(ls -1t $DUMP_PATH | tail -n +200) |