文档标题使用“#”的语法,章节标题使用“##” ~ “####”共三个级别
鉴于中文字体问题,仅使用黑体__Bold__
和删除线~~Strikethrough~~
,不使用斜体。
使用“-”表示列表。
(ns switch | |
(:require [clojure.pprint :as pprint])) | |
(defn project-clj-map [filename] | |
(->> (slurp filename) | |
(read-string) | |
(drop 1) | |
(partition 2) | |
(map vec) | |
(into {}))) |
import io | |
from PIL import Image # https://pillow.readthedocs.io/en/4.3.x/ | |
import requests # http://docs.python-requests.org/en/master/ | |
# example image url: https://m.media-amazon.com/images/S/aplus-media/vc/6a9569ab-cb8e-46d9-8aea-a7022e58c74a.jpg | |
def download_image(url, image_file_path): | |
r = requests.get(url, timeout=4.0) | |
if r.status_code != requests.codes.ok: |
# first you need a new empty branch; let's call it `newroot` | |
git checkout --orphan newroot | |
git rm -rf . | |
# then you apply the same steps | |
git commit --allow-empty -m 'root commit' | |
git rebase --onto newroot --root master | |
git branch -d newroot |
#!/bin/bash | |
set -eu | |
KERNEL_DRIVER="/lib/modules/$1/kernel/drivers/video/nvidia.ko" | |
INSTALLER="/usr/src/cuda-toolkit" | |
# Build new driver if it doesn't exist | |
if [ -e $KERNEL_DRIVER ] ; then | |
echo "NVIDIA driver already installed for this kernel" >&2 |
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
input { | |
file { | |
path => /tmp/application.log | |
codec => multiline { | |
pattern => "^(%{TIMESTAMP_ISO8601})" | |
negate => true | |
what => "previous" | |
} | |
} | |
} |
(defun org-interpret-org-as-dir-file-skeleton () | |
"Return the outline paths as lists. | |
Separated in those headlines not tagged 'file' and those tagged with 'file'." | |
(let (output-files output-dirs) | |
(org-map-entries | |
(lambda () | |
(let* ((headline (car (cddddr (org-heading-components)))) | |
(headline-path | |
(reverse | |
(cons |
CREATE USER r_only_user identified by 'password'; | |
GRANT SELECT, SHOW VIEW, PROCESS, REPLICATION CLIENT ON *.* TO 'r_only_user'@'%' IDENTIFIED BY 'password'; | |
GRANT SELECT, SHOW VIEW, PROCESS, REPLICATION CLIENT ON *.* TO 'r_only_user'@'localhost' IDENTIFIED BY 'password'; | |
FLUSH PRIVILEGES; |