Skip to content

Instantly share code, notes, and snippets.

jsntn / clocktable-by-tag.el
Created April 3, 2023 09:31 — forked from nonducor/clocktable-by-tag.el
Emacs org-mode dynamic block similar to clocktable, but grouped by tag. See:
(require 'org-clock)
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
(defun clocktable-by-tag/insert-tag (files params)
(let ((tag (plist-get params :tags))
jsntn / Build Emacs for Windows 64bit with Native
Created November 18, 2022 12:58 — forked from nauhygon/Build Emacs for Windows 64bit with Native
Step-by-step instructions to build Emacs for Windows 64 bit with MSYS2 and MinGW-w64. Now `native-comp` supported.

Build Emacs-w64 with MSYS2/MinGW-w64 with Native Compilation

Instructions are modified from emacs-w64 Wiki page by zklhp. Many thanks for sharing!

  1. Download the latest MSYS2 from this download page.

  2. Install MSYS2 to, for example, C:\msys2 (make sure no space in path to avoid unwanted problems).

  3. Optionally prettify the MSYS2 console mintty with ~/.minttyrc to make it more pleasing to eyes. Thanks to this awesome theme!



  • <2023-03-21 Tue 15:00> 排版优化中……目前进度 1409/2212
  • 优化工具:Emacs Org-mode with Eighty Column Rule


  • TOC
yum install -y gcc wget make curl-devel expat-devel \
gettext-devel openssl-devel perl-devel zlib-devel
cd ~
if [ ! -f git-${GIT_VERSION}.tar.gz ]; then
BASE_DIR=$(dirname $0)
if [ ! -d /share/Public/toolchain ]; then
mkdir /share/Public/toolchain
➜ site-lisp git:(master) git clone
Cloning into 'pdf-tools'...
remote: Enumerating objects: 4161, done.
remote: Total 4161 (delta 0), reused 0 (delta 0), pack-reused 4161
Receiving objects: 100% (4161/4161), 2.08 MiB | 2.82 MiB/s, done.
Resolving deltas: 100% (2961/2961), done.
➜ site-lisp git:(master) ✗ cd pdf-tools
➜ pdf-tools git:(master) ll
total 168
-rw-r--r-- 1 jason staff 34K Dec 19 00:43 COPYING
jsntn / brew-install-graphviz.log
Created December 9, 2021 16:15
Homebrew - install old version of GraphViz
➜ ~ git:(master) ✗ brew tap-new jason/local-graphviz
Initialized empty Git repository in /usr/local/Homebrew/Library/Taps/jason/homebrew-local-graphviz/.git/
[main (root-commit) 0d37a4f] Create jason/local-graphviz tap
3 files changed, 90 insertions(+)
create mode 100644 .github/workflows/publish.yml
create mode 100644 .github/workflows/tests.yml
create mode 100644
==> Created jason/local-graphviz
(defun +org-notes-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
jsntn /
Created February 25, 2020 09:54 — forked from stopyoukid/
Script that takes a git diff and outputs an html file in GitHub style
# Convert diff output to colorized HTML.
# (C) Mitch Frazier, 2008-08-27
# Modified by stopyoukid
html="<html><head><meta charset=\"utf-8\"><title>Pretty Diff</title><style>body {text-align: center;}#wrapper {display: inline-block;margin-top: 1em;min-width: 800px;text-align: left;}h2 {background: #fafafa;background: -moz-linear-gradient(#fafafa, #eaeaea);background: -webkit-linear-gradient(#fafafa, #eaeaea);-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa',endColorstr='#eaeaea')\";border: 1px solid #d8d8d8;border-bottom: 0;color: #555;font: 14px sans-serif;overflow: hidden;padding: 10px 6px;text-shadow: 0 1px 0 white;margin: 0;}.file-diff {border: 1px solid #d8d8d8;margin-bottom: 1em;overflow: auto;padding: 0.5em 0;}.file-diff > div {width: 100%:}pre {margin: 0;font-family: \"Bitstream Vera Sans Mono\", Courier, monospace;font-size: 12px;line-height: 1.4em;text-indent: 0.5em;}.file {color:
jsntn / anki_mobile_card.html
Created June 6, 2018 06:31 — forked from sartak/1-anki_mobile_card.html
HTML used by AnkiMobile to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS. When used by AnkiMobile, the card's HTML replaces the `<!-- (Card contents) -->` comment in this gist, with the shared styles dropped inline inside a `<style>` tag.
<!doctype html>
<html class=" webkit safari mobile iphone js">
<meta name="viewport" content="width=device-width;">
<style id="ss"></style>
body {
text-align: center;
font-size: 1em;
-webkit-transform: translate3d(0,0,0);