org-mode is so much better with some rich formatting. It really
makes it appealing as a text format with embedded and actionable code —
whether that is as a source file for literate-programming or just some notes
with code snippets.
I've added the following to my
.emacs, based on
Org as a Word Processor:
;; org-mode formatting improvements (require 'org-bullets) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (whitespace-mode -1))) (setq org-hide-emphasis-markers t) (let* ((variable-tuple (cond ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro")) ((x-list-fonts "Lucida Grande") '(:font "Lucida Grande")) ((x-list-fonts "Verdana") '(:font "Verdana")) ((x-family-fonts "Sans Serif") '(:family "Sans Serif")) (nil (warn "Cannot find a Sans Serif Font. Install Source Sans Pro.")))) (base-font-color (face-foreground 'default nil 'default)) (headline `(:inherit default :weight bold :foreground ,base-font-color))) (custom-theme-set-faces 'user `(org-level-8 ((t (,@headline ,@variable-tuple)))) `(org-level-7 ((t (,@headline ,@variable-tuple)))) `(org-level-6 ((t (,@headline ,@variable-tuple)))) `(org-level-5 ((t (,@headline ,@variable-tuple)))) `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1)))) `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25)))) `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5)))) `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75)))) `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))
And then I start the .org files with the following parameters:
#+STARTUP: indent #+STARTUP: odd #+STARTUP: hidestars #+STARTUP: showall #+TITLE: document title
Some nice info on how to get emacs' org-mode looking nice (well, for a plain text format at least).
Eel - A little Python library for making simple Electron-like HTML/JS GUI apps
I recently updated my podcast pre-processing script to Python 3.6 & the
multiprocessing.Pool module and then a few days later realized the whole thing would be much better as a simple
The goal is to:
This lets me see everything that is posted without having to seek it out and wade through the ads and other things Facebook is trying to recommend to me.
The output is currently very rough, but it'll do for now - in particular, it just screenshots the post, rather than trying to extract the content and re-render it.
Browser automation got a lot easier with
Easily add user-friendly command-line arguments.
Lightweight CSS grid and typography
JSON version of RSS/Atom
Lightweight Python template engine
After implementing my bot in Python, I thought I'd try porting it to other languages as an opportunity to learn a bit of Go and Rust.
Both Go and Rust are statically typed and compile to a single self-contained binary, which is appealing as there is no need to maintain a virtualenv and install dependencies on the server.
The parsing code for "rain" messages is a good starting point to compare the bots. Each is using a "parser combinator" library to parse the messages.
Quick thoughts: Python & Go are both pretty sane. There's almost certainly a better way in Rust, but I found it considerably harder.
The tests are stored in different places in each version so the total line count is not comparable, and the Rust version includes "ignore case" code that is built into Python's parser combinators, and that I added into a fork of the Go parser library.