create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| upstream rails_app_upstream { | |
| server unix:/home/deployer/projects/rails_app/shared/tmp/sockets/unicorn.socket fail_timeout=0; | |
| } | |
| server { | |
| #listen 80; ## listen for ipv4; this line is default and implied | |
| #listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
| server_name localhost my_server.ru; | |
| root /home/deployer/projects/rails_app/current/public; |
| #!/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) |
| /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` |
| 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] |
| BEGIN { | |
| require 'net/http' | |
| Net::HTTP.module_eval do | |
| alias_method '__initialize__', 'initialize' | |
| def initialize(*args,&block) | |
| __initialize__(*args, &block) |
$ uname -r
| // 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'); |
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).