Skip to content

Instantly share code, notes, and snippets.

@eght
eght / uuid.R
Created November 18, 2018 16:28 — forked from cbare/uuid.R
A snippet of R code to generate a version 4 (random) UUID.
## Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
## where x is any hexadecimal digit and y is one of 8, 9, A, or B
## e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479
uuid <- function(uppercase=FALSE) {
hex_digits <- c(as.character(0:9), letters[1:6])
hex_digits <- if (uppercase) toupper(hex_digits) else hex_digits
y_digits <- hex_digits[9:12]
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[letterpaper, 12pt]{article}
\usepackage{amsmath,amsfonts,amssymb,fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Adobe Caslon Pro}
\title{\Large\sc title goes here}
\author{Jonathan M. Sterling}
@eght
eght / 弟子规.txt
Created September 16, 2018 08:01 — forked from zii/弟子规.txt
弟子规
总 叙 信
弟子规 圣人训 首孝弟 次谨信 凡出言 信为先 诈与妄 奚可焉
泛爱众 而亲仁 有余力 则学文 话说多 不如少 惟其是 勿佞巧
奸巧语 秽污词 市井气 切戒之
入 则 孝 见未真 勿轻言 知未的 勿轻传
事非宜 勿轻诺 苟轻诺 进退错
父母呼 应勿缓 父母命 行勿懒 凡道字 重且舒 勿急疾 勿模糊
@eght
eght / aj-org-zotxt-configuration.el
Created September 16, 2018 04:36 — forked from andersjohansson/aj-org-zotxt-configuration.el
Using org-zotxt with working export to odt scannable by odf/rdf scan (http://zotero-odf-scan.github.io/zotero-odf-scan/) and using pandoc cite-syntax. This depends on org-pdcite (https://gitlab.com/egh/org-pdcite/). I use it with extended allowed characters, this branch: https://gitlab.com/andersjohansson/org-pdcite/commits/aj-extensions. BibLaT…
(require 'org-zotxt)
(require 'org-pdcite)
(setq org-zotxt-link-description-style :betterbibtexkey)
(org-add-link-type
"zotero"
(lambda (rest)
(zotxt-select-key (substring rest 15)))
#'aj/org-zotero-link))
@eght
eght / tmux.conf
Created October 17, 2015 13:53 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000