Skip to content

Instantly share code, notes, and snippets.

View egh's full-sized avatar
💭
working

Erik Hetzner egh

💭
working
View GitHub Profile
@egh
egh / Washington Monthly.js
Created May 13, 2011 00:42 — forked from adam3smith/Washington Monthly.js
Washington Monthly.js
{
"translatorID":"e623eec7-ad54-4201-b709-654bf3fd7f70",
"label":"Washington Monthly",
"creator":"Sebastian Karcher",
"target":"^https?://www\\.washingtonmonthly\\.com",
"minVersion":"1.0",
"maxVersion":"",
"priority":100,
"inRepository":"1",
"translatorType":4,
{
"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,
{
"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,
@egh
egh / Wikileaks Cables.js
Created June 27, 2011 00:54
wikileaks cables zotero translator
{
"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,
@egh
egh / wl-auto-config.el
Created September 10, 2011 01:39
wl auto config
;; 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 / template.js
Created October 22, 2011 21:18
Zotero translator framework template
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 : "...",
{
"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 / weaving.org
Created February 19, 2014 18:24
Weaving a budget with org-mode & ledger

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

@egh
egh / api-access-example.py
Last active August 29, 2015 14:06
python rich citations api access example
#!/usr/bin/env python
# Get the authors from a paper via api.richcitations.org
# call as api-access-example.py 10.1371/journal.pone.0106530
import json
import requests
import sys
BASE_URL='http://api.richcitations.org/v0/'
@egh
egh / wl-fastfind.el
Created October 19, 2014 19:19
Wanderlust fastfind
;;; wl-fastfind.el --- Prompt for a query string and display search results.
;; Copyright (C) 2014 Erik Hetzner <egh@e6h.org>
;; Author: Erik Hetzner <egh@e6h.org>
;; Keywords: mail, net news
;; 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)