Example file

This is an example file to show how preprocessing works. If you want to show source code in a document, you can directly typing it in. However, that means that we cannot compile the code to check if it is working. To test the code, we must include it in a separate file, and then include the file in the main text.


How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.


Install dependencies

sudo yum install git wget bzip2 flex -y
sudo yum install libicu-devel readline-devel libtool-ltdl-devel -y


View cargo.toml
name = "my-s3-buckets"
version = "0.1.0"
authors = ["Me Me <>"]
rusoto_core = "0.30.0"
rusoto_s3 = "0.30.0"
let recv = (client, maxlen) => {
let bytes = Bytes.create(maxlen);
let len = Unix.recv(client, bytes, 0, maxlen, []);
Bytes.sub_string(bytes, 0, len)
let parse_top = top => {
let parts = Str.split(Str.regexp("[ \t]+"), top);
switch (parts) {
# -*- coding: utf-8 -*-
Extract title and metadata from a reStructuredText document
This functionality was sourced out of the docutils_ integration of the
`homework productions`_ web application.
Its purpose is to transform reStructuredText_ documents to HTML, but extract
the title and metadata before rendering the body and provide them separately.
View deft-in-dir.el
(defun deft-in-dir (directory &optional buffer)
(interactive "Ddir: ")
(setq buffer (or buffer "*deft-in-dir*"))
(switch-to-buffer (or buffer "*deft-in-dir*"))
;; load deft if not loaded yet
(unless (and
(boundp 'deft-directory)
(boundp 'deft-buffer))
View php_install.txt
The php.ini file can be found in:
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PHP72 Extensions will always be compiled against this PHP. Please install them using --without-homebrew-php to enable compiling against system PHP.
View pg10-install.txt
Creating new PostgreSQL cluster 10/main ...
/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.