Skip to content

Instantly share code, notes, and snippets.

agum onkey agumonkey

  • NONE
  • Dark side of the moon @ ['tkf8-2-1', 'ay21-3', '3263-827']
Block or report user

Report or block agumonkey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import sys
import time
import threading
import socket
View hn.el
;;; hn.el --- convert hacker news post into org-mode buffer -*- lexical-binding: t -*-
;; Copyright (C) 2018- Free Software Foundation, Inc.
;; Author: Johan Ponin <>
;; Version: 0.0.1
;; Package-Version: 20181103.0001
;; Keywords: hackernews, org-mode
;; This program is free software; you can redistribute it and/or modify
from urllib.parse import urlparse, urlunparse
url helpers
def isurl(o):
return o.startswith('http://') \
or o.startswith('https://')
## based on airbnb proto interview
def rev(s):
return s[::-1]
# a .. b
# (a,b) .. (b,a)
def mir(a,b):
i = a
j = b
agumonkey / fmt.el
Created Mar 14, 2019
fmt.el - ala python string formatting
View fmt.el
;;; ala python string formatting
;;; (let ((some "Object") (i 1)) (f "<{some}... [{i}:{i}>")) => "<Object... [1:1]>
;;; todo: {...} parser
;;; todo: wrapping defmacro
;;; todo: wrapping defun
;;; state: alpha²
View lem.el
(cl-flet ((fun (x) (1+ x)))
(fun 0))
(let ((fun (lambda (x) (1+ x))))
(fun 0))
(defmacro lem (bs &rest body)
(cl-flet ((fun? (form)
(and (listp form)
(eq (length form) 3)
agumonkey /
Last active Mar 9, 2019
pipes in python
import urllib.request as rq
class ConfusedThreader(Exception):
class Fun:
def __getattr__(self,attribute):
def aux(o):
return getattr(o,attribute)()
return aux
View progm.el
(defmacro progm (body)
(if (null body)
`(cons ,(car body)
(progm ,(cdr body)))))
(defmacro progb (&rest pair)
(let ((a (car pair))
(b (cadr pair)))
`(cons ,a (cons ,b nil))))
agumonkey / hn-async.el
Last active Mar 6, 2019
HN async: port of a port of a script from a reddit that turns an HN article into an org-mode file
View hn-async.el
HN async: port of a port of a script from a reddit that turns an HN article into an org-mode file
@TODO: full eager graph walk of the json sub-structures
@TODO: full lazy walk at depth d
@TODO: org-mode overlay to intercept subtree unfolding as async GET
(setq lexical-binding t)
agumonkey / fan.kt
Last active Mar 6, 2019
fantom type-ish in kotlin
View fan.kt
// fantom type-ish in kotlin
// class res
// class open:res
// class close:res
// class file<res>
// fun open file<close> -> file<open>
// fun close file<open> -> file<close>
// fun read file<open> -> file<open> list<string>
You can’t perform that action at this time.