A CompletableFuture
object is a placeholder for a result that might not be available
at present but will be available in future.
The CompletableFuture
library provides mechanisms to perform asynchronous
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
Host bitbucket.org-name1
HostName bitbucket.org
User git
IdentityFile ~/.ssh/halc_bitbucket_rsa
IdentitiesOnly yes
Host bitbucket.org-name1
HostName bitbucket.org
User git
There are two main modes to run the Let's Encrypt client (called Certbot
):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com
.
HTML is served from /var/www/mydomain
, and challenges are served from /var/www/letsencrypt
.
Drop all tables from a database in MySQL
SET FOREIGN_KEY_CHECKS = 0;
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = 'DATABASE_NAME'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
# Updated for new gist urls | |
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) |
''' | |
The defualt pip3 installation in Ubuntu 14.04 (pip 1.5.4) seems to have a bug. | |
It gave an Assertion Error like this | |
Exception: | |
Traceback (most recent call last): | |
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main | |
status = self.run(options, args) | |
File "/usr/lib/python3/dist-packages/pip/commands/freeze.py", line 74, in run | |
req = pip.FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags) |