Skip to content

Instantly share code, notes, and snippets.

View egh's full-sized avatar
💭
working

Erik Hetzner egh

💭
working
View GitHub Profile
test;
import Ember from 'ember';
export default Ember.Component.extend({
people: ['donatello', 'michelangelo']
});
#!/usr/bin/env python
import argparse
from datetime import datetime
from decimal import Decimal
import json
import re
import requests
import sys
import signal
@egh
egh / pull_request.md
Last active September 15, 2015 20:51 — forked from diiq/pull_request.md
Pull Request Template

name: pr

key: pr

--

Link to story: https://www.pivotaltracker.com/story/show/$1

What this PR does:

${2:Explain in a few sentences what functionality changed, and how.}

${3:Can your changes be seen by a user? Then add a screenshot. Is it an interaction? Perhaps a recording.}

@egh
egh / jabber-hipchat.el
Last active January 3, 2018 18:08
jabber.el hipchat setup
(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)
@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)
@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 / 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

{
"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 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 : "...",
@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