Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
working

Erik Hetzner egh

💭
working
View GitHub Profile
View components.possibly-leaking-component.js
test;
import Ember from 'ember';
export default Ember.Component.extend({
people: ['donatello', 'michelangelo']
});
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
@egh
egh / pull_request.md
Last active Sep 15, 2015 — forked from diiq/pull_request.md
Pull Request Template
View pull_request.md

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 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)
@egh
egh / wl-fastfind.el
Created Oct 19, 2014
Wanderlust fastfind
View wl-fastfind.el
;;; 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 Aug 29, 2015
python rich citations api access example
View api-access-example.py
#!/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 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 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