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.
def self.group_by_month_total_chart | |
project = {"$project" => | |
{ | |
"total" => 1, | |
"new_created" => | |
{ | |
"mo" => {"$month" => "$invoice_date"} | |
} | |
} | |
}, |
#!/usr/bin/env ruby | |
period = ARGV[0] | |
while true | |
f = File.open("access.log", "a") | |
value = ["GET", "POST"].sample | |
output = "#{Time.now.strftime("%T")} #{value} /test/test/test.html" | |
f.puts output | |
puts output | |
f.close | |
sleep(period.to_f) |
#!/usr/bin/env ruby | |
require 'yaml' | |
PLAYS_DIR = '.' | |
ROLES_DIR = './roles' | |
def deps_of(role) | |
dep_path = File.join(ROLES_DIR, "#{role}/meta/main.yml") | |
File.exists?(dep_path) ? (YAML.load_file(dep_path)['dependencies'] || []) : [] |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
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.
WAL-E needs to be installed on all machines, masters and slaves.
Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf
is:
archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
Note: I'm using RVM as my ruby version manager, also yo could use rbenv
ruby -v
rvm install ruby --latest OR rvm install ruby 2.5.0
#!/bin/bash | |
GARBAGE="/var/lib/docker/aufs/diff" | |
du -hd 1 $GARBAGE | sort -hrk 1 | head -25 | |
find $GARBAGE -maxdepth 1 -name *-removing -exec rm -rf '{}' \; |