Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
working

Erik Hetzner egh

💭
working
View GitHub Profile
@egh
egh / weaving.org
Created Feb 19, 2014
Weaving a budget with org-mode & ledger
View weaving.org

Weaving a budget with org-mode & ledger

ledger comes with a built in budget system, but I wanted to get an “envelope”, or “YNAB” style budget working. While this was easy to do in theory, in practice it proved more difficult. The theory is pretty simple; enevelope budgeting merely requires you to create some new accounts to keep track of each “envelope” of money. But in practice, it requires a huge amount of duplicate data-entry, because even when using ledger’s automatic transactions, because each month’s budget is mostly the same but not necessarily exactly the same.The following

View components.possibly-leaking-component.js
test;
import Ember from 'ember';
export default Ember.Component.extend({
people: ['donatello', 'michelangelo']
});
@egh
egh / jabber-hipchat.el
Last active Jan 3, 2018
jabber.el hipchat setup
View jabber-hipchat.el
(require 's)
(require 'request)
(require 'seq)
(require 'jabber)
(defvar hipchat--user-info-for-completion nil)
(defcustom hipchat-nickname "Full name" "Hipchat real name (see see https://hipchat.com/account/xmpp)."
:type '(string)
View process_timings.py
#!/usr/bin/env python
import argparse
from datetime import datetime
from decimal import Decimal
import json
import re
import requests
import sys
import signal
View gist:4580965
{
"translatorID": "9fa7d89b-d5ad-4c68-a834-f96fbc8376fa",
"translatorType": 4,
"label": "Chista",
"creator": "CRCIS",
"target": "http://journals\\.ut\\.ac\\.ir/page/main-page.html",
"minVersion": "1.0",
"maxVersion": "",
"priority": 500,
"inRepository": true,
@egh
egh / template.js
Created Oct 22, 2011
Zotero translator framework template
View template.js
FW.Scraper({
itemType : 'journalArticle',
detect : 'always'
title : FW.Xpath(/.../).text().trim(),
creators : FW.Xpath(/.../).text().trim().
cleanAuthor("author"),
date : FW.Xpath(/.../).text(),
volume : FW.Xpath(/.../).text(),
issue : FW.Xpath(/.../).text(),
publicationTitle : "...",
View wl-auto-config.el
;; Copyright 2011 Erik Hetzner
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@egh
egh / Wikileaks Cables.js
Created Jun 27, 2011
wikileaks cables zotero translator
View Wikileaks Cables.js
{
"translatorID": "6bb5099b-ae1a-4a08-8f2a-3429138ec2e5",
"label": "Wikileaks Cables",
"creator": "Erik Hetzner",
"target": "^http://(www\\.)?wikileaks\\.org/cable/",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
View The New Yorker.js
{
"translatorID":"0fba73bf-f113-4d36-810f-2c654fa985fb",
"label":"The New Yorker",
"creator":"Sebastian Karcher",
"target":"https?://www\\.newyorker\\.com",
"minVersion":"1.0",
"maxVersion":"",
"priority":100,
"inRepository":"1",
"translatorType":4,
View VoxEU.js
{
"translatorID":"aa6ba023-4fbe-407c-b0c3-5997887db1eb",
"label":"VoxEU",
"creator":"Sebastian Karcher",
"target":"^https?://www\\.voxeu\\.org",
"minVersion":"1.0",
"maxVersion":"",
"priority":100,
"inRepository":"1",
"translatorType":4,