Typically, this is how you'd connect to Redis:
Redis.new(url: ENV["REDIS_URL"])Where REDIS_URL uses the following format:
| #! /bin/sh | |
| email="[email protected]" | |
| domains="example.com,*.example.com" | |
| cloudflare_email="[email protected]" | |
| cloudflare_api_key="me-api-key" | |
| # END CONFIG | |
| brew install certbot |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| WIFI:S:<SSID>;T:WPA;P:<PASSWD>;; |
| docker run -it --rm --name certbot \ | |
| -v $(pwd)/ssl:/etc/letsencrypt \ | |
| -v $(pwd)/ssl:/var/lib/letsencrypt \ | |
| certbot/certbot certonly \ | |
| --server https://acme-v02.api.letsencrypt.org/directory \ | |
| --manual \ | |
| --preferred-challenges dns \ | |
| -d *.example.com \ | |
| -d example.com |
Verify the microcode version prior to updating:
dmesg | grep microcode
Update your package list and install the following packages:
apt update
apt install microcode.ctl intel-microcode
Reboot and run the following command again to verify the new microcode is in effect:
Verify your current kernel version:
uname -r
To update the Linux kernel, select a version from the following URL:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
For example v4.14.13:
| { | |
| "AF": "Afghanistan", | |
| "AX": "AlandIslands", | |
| "AL": "Albania", | |
| "DZ": "Algeria", | |
| "AS": "AmericanSamoa", | |
| "AD": "Andorra", | |
| "AO": "Angola", | |
| "AI": "Anguilla", | |
| "AQ": "Antarctica", |
| # Install Docker | |
| curl -fsSL https://get.docker.com/ | sh | |
| # Run Rancher | |
| docker run -d \ | |
| --name=rancher \ | |
| --restart=always \ | |
| -v /var/lib/mysql:/var/lib/mysql \ | |
| -p 8080:8080 \ | |
| rancher/server:stable |
| defmodule Party.Clock do | |
| use GenServer | |
| def start_link do | |
| case GenServer.start_link(__MODULE__, [], name: {:global, __MODULE__}) do | |
| {:ok, pid} -> | |
| {:ok, pid} | |
| {:error, {:already_started, pid}} -> | |
| IO.puts("Already started!!") | |
| Process.link(pid) |