Skip to content

Instantly share code, notes, and snippets.

Avatar

Bill Burdick zot

  • Jerusalem, Israel
View GitHub Profile
@zot
zot / org-roam-ivy.el
Last active May 13, 2021
first cut at scalable incremental completion for org-roam
View org-roam-ivy.el
;;; org-roam-ivy.el --- scalable incremental completion for org-roam -*- coding: utf-8; lexical-binding: t; -*-
;; Copyright © 2021 Bill Burdick <bill.burdick@gmail.com>
;; Author: Bill Burdick <bill.burdick@gmail.com>
;; URL: https://gist.github.com/zot/1d6f164178f41498f912613f2054bbb7
;; Keywords: org-mode, roam, convenience
;; Version: 0.0.14
;; Package-Requires: ((emacs "26.1") (dash "2.13") (f "0.17.2") (org "9.4") (emacsql "3.0.0") (emacsql-sqlite "1.0.0") (magit-section "2.90.1") (org-roam "2.0.0"))
@zot
zot / ob-skewer.el
Last active Aug 10, 2020
Small hack to let orgmode babel JS blocks use skewer if it's currently connected
View ob-skewer.el
;; modify ob-js to redirect to skewer if it is currently connected
;; this code can go in an emacs settings file
(require 'ob-js)
(require 'cl)
(advice-add 'org-babel-execute:js :around 'bill/org-babel-execute:skewer)
;;(advice-remove 'org-babel-execute:js #'bill/org-babel-execute:skewer)
(defun bill/org-babel-execute:skewer (oldFunc body params)
(if (skewer-ping)
(lexical-let* ((result-type (cdr (assoc :result-type params)))
View base.coffee
###
Copyright (C) 2013, Bill Burdick, Tiny Concepts: https://github.com/zot/Leisure
(licensed with ZLIB license)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
View org.coffee
###
Copyright (C) 2013, Bill Burdick, Tiny Concepts: https://github.com/zot/Leisure
(licensed with ZLIB license)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
View advice.litcoffee

Advice

Copyright (C) 2015, Bill Burdick, Roy Riggs, TEAM CTHULHU

Licensed with ZLIB license (see "License", below).

Advice is part of Leisure project. You can find it on Github.

Licensed with ZLIB license.

View README.org

What is Leisure?

Simply put, Leisure is a document-oriented, exploratory computing environment for what we call Illuminated Programming. Leisure documents are:

  • editable
  • collaborative
  • interactive
  • web-based (zero install)

Illuminated Programming is our term for application, source code, and data, all rolled up into one interactive, collboratively editable

@zot
zot / phi-search-kluge.el
Created Sep 10, 2013
kluge to clean up phi-search results in multiple-cursor mode
View phi-search-kluge.el
(defvar my-phi-search-counter 0)
(defvar my-mc-cleanup-counter 0)
(defadvice phi-search-complete (around my-phi-search-cleanup)
ad-do-it
(cl-incf my-phi-search-counter))
(defadvice mc/execute-command-for-all-fake-cursors (around my-mc/execute-command-for-fake-all-cursors)
ad-do-it
(if (< my-mc-cleanup-counter my-phi-search-counter)
View differenceLists.md

Difference Lists

A difference list is really a layer on top of another data structure that you can use for cheap appending, later extracting the underlying data structure when you’re done with all the appending. It’s kind of like an array buffer or a string buffer and it’s very simple to implement. You can back a difference list with any data structure that allows you to add an item cheaply to the start or end.

Here are two examples, one using cons-lists in Clojure and one using tables in Lua. Appending two Clojure cons-lists and Lua tables is normally a O(n) operation, making it O(n^2) for appending multiple lists or tables. Difference lists let you append in O(1) and produce the final list or table in O(n), regardless of how many difference lists you’ve appended together.

One interesting thing about difference lists is that a difference list is really a function. Calling it with an argument extracts the backing list from the difference list by appending or prepending to the argument, so calling a