I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| { | |
| "basics": { | |
| "name": "Thomas Edison", | |
| "label": "Inventor and Businessman", | |
| "picture": "https://example.com/photo.jpg", | |
| "email": "[email protected]", | |
| "phone": "(123) 456-7890", | |
| "website": "https://thomasedison.com", | |
| "summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
| "location": { |
| class ImportParticipant | |
| def initialize(source:, :target) | |
| @source = source | |
| @target = target | |
| end | |
| attr_reader :source, :target | |
| def call | |
| data = @source.read_and_parse |
| require 'minitest/autorun' | |
| class PianoKeyTest < Minitest::Test | |
| KEYS_COUNT = 88 | |
| BLACK_KEY_SEQ = [0, 2, 5, 7, 9] | |
| BLACK_SEQ_START_POS = 5 | |
| BLACK = "black" | |
| WHITE = "white" |
| f |
| if [ -n "$ZSH_VERSION" ]; then | |
| echo 'zsh env' | |
| echo 'export COVERAGE=true' >> ~/.zshrc | |
| elif [ -n "$BASH_VERSION" ]; then | |
| echo 'bash env' | |
| echo 'export COVERAGE=true' >> ~/.bashrc | |
| else | |
| echo 'You need to run `COVERAGE=true rspec` each time' | |
| fi |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
Rack is a common interface to interact with different ruby server
to understand the concept of http server, we just need to search for some ruby code that implement a tcp server without any library.
here is a potato for you
server = TCPServer.new('localhost', 12345)| require 'webrick' | |
| class BlogApplication < WEBrick::HTTPServlet::AbstractServlet | |
| class PostRepository | |
| Post = Struct.new(:title, :content) | |
| def self.get | |
| [ | |
| Post.new("post1", "content1"), | |
| Post.new("post2", "content2") |
| #!/usr/bin/env ruby | |
| require "webrick" | |
| =begin | |
| WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby. | |
| It comes with most installations of Ruby by default (it’s part of the standard library), | |
| so you can usually create a basic web/HTTP server with only several lines of code. | |
| The following code creates a generic WEBrick server on the local machine on port 1234, |
| # Code from https://www.practicingruby.com/articles/implementing-an-http-file-server | |
| require 'socket' | |
| server = TCPServer.new('localhost', 2345) | |
| loop do | |
| socket = server.accept | |
| request = socket.gets | |
| response = <<-HTML | |
| <html> |