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] |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| def resize_nocrop_noscale(image, w,h) | |
| w_original = image[:width].to_f | |
| h_original = image[:height].to_f | |
| if w_original < w && h_original < h | |
| return image | |
| end | |
| # resize | |
| image.resize("#{w}x#{h}") |
| # RAILS_ROOT/config/unicorn.rb | |
| # Search for "# SET ME!" and replace these with your own settings!. | |
| HOW_DEEP_WE_R_FROM_RAILS_ROOT = "../.." | |
| # Set environment to development unless something else is specified | |
| RAILS_ROOT = File.expand_path(HOW_DEEP_WE_R_FROM_RAILS_ROOT, File.dirname(__FILE__)) | |
| SHARED_PATH = File.expand_path('../shared', RAILS_ROOT) | |
| ENV['BUNDLE_GEMFILE'] = File.expand_path("#{HOW_DEEP_WE_R_FROM_RAILS_ROOT}/Gemfile", File.dirname(__FILE__)) |