Skip to content

Instantly share code, notes, and snippets.

View runejuhl's full-sized avatar
💻
[runejuhl is typing]

Rune Juhl Jacobsen runejuhl

💻
[runejuhl is typing]
View GitHub Profile
@runejuhl
runejuhl / org-latex-per-file-class.el
Created November 22, 2013 17:33
Empty LaTeX class for org-mode export.
(unless (boundp 'org-latex-classes)
(setq org-latex-classes nil))
(add-to-list 'org-latex-classes
'("per-file-class"
"\\documentclass{article}
[NO-DEFAULT-PACKAGES]
[EXTRA]"))

Keybase proof

I hereby claim:

  • I am runejuhl on github.
  • I am runejuhl (https://keybase.io/runejuhl) on keybase.
  • I have a public key whose fingerprint is F51C 442E CCEA 4280 D1AE 149A 5368 F462 192D 5F54

To claim this, I am signing this object:

@runejuhl
runejuhl / git.sh
Created February 14, 2016 03:24
Git info in $PS1
# Useful for displaying git status whenever you cd to a git dir.
# Example:
# runejuhl@cartagena:~//git/project:master:2A1AM5M3??
# for 2 new staged files, 1 staged file that's been modified since staging, 5 modified files and 3 untracked files.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/:\1/'
}
class JSONError extends Exception {}
class JSONErrorDepth extends JSONError {}
class JSONErrorMalformed extends JSONError {}
class JSONErrorSyntax extends JSONError {}
function json_check_if_error() {
$error = json_last_error();
switch ($error) {
case JSON_ERROR_NONE:
Array.prototype.slice.call(document.querySelectorAll('.game-name')).filter((x) => x.previousElementSibling.querySelector('.hb-steam')).map((x) => x.querySelector('h4').innerText).forEach((x) => console.log(x))
Asdivine Hearts
Broken Age
Bulb Boy
The Bureau: XCOM Declassified
Costume Quest
The Darkness II
Duke Nukem Forever
Expand - Soundtrack Edition
- Welcome keynote
https://fosdem.org/2017/schedule/event/keynotes_welcome/
- Puppet catalog diffs in TheForeman
https://fosdem.org/2017/schedule/event/puppet_catalog_diffs/
- Using graph databases in popular open source CMSs
https://fosdem.org/2017/schedule/event/graph_drupal_cms_neo4j/
- Jockeying the Jigsaw
https://fosdem.org/2017/schedule/event/jigsaw1/
- From 0 to 6 GHz in 30 minutes: Bootstrapping your SDR experience
https://fosdem.org/2017/schedule/event/introtosdr/
@runejuhl
runejuhl / push.bash
Created April 3, 2017 09:22
push extension for password-store
#!/bin/bash
set -o errexit
p=${PASSWORD_STORE_DIR:-~/.password-store}
for d in $(find -L $p -type d -name '.git' | xargs dirname); do
cd "$d"
( git fetch && git rebase )
git push
;; -*-lisp-*-
;;
;; Here is a sample .stumpwmrc file
(in-package :stumpwm)
(set-prefix-key (kbd "C-t"))
;;; log to debug output
(redirect-all-output (data-dir-file "debug" "log"))
(defvar *default-groups*
;; index, name, optionally key binding
'((1 "www")
(2 "irc")
(3 "mail")
(4 "emacs")
(5 "enableit")
(6 "projects")
(7 "stuff")
(8 "repl")
@runejuhl
runejuhl / notmuch-hello-unread.el
Created January 24, 2018 14:33
notmuch functions to show unread count in hello buffer
(defun notmuch-hello-insert-buttons (searches)
"Insert buttons for SEARCHES.
SEARCHES must be a list of plists each of which should contain at
least the properties :name NAME :query QUERY and :count COUNT,
where QUERY is the query to start when the button for the
corresponding entry is activated, and COUNT should be the number
of messages matching the query. Such a plist can be computed
with `notmuch-hello-query-counts'."
(let* ((widest (notmuch-hello-longest-label searches))