Skip to content

Instantly share code, notes, and snippets.

View deobald's full-sized avatar
🧀
eating cheese and being afraid

Steven Deobald deobald

🧀
eating cheese and being afraid
View GitHub Profile
class ThreadTest < Test::Unit::TestCase
# ~ 340 microseconds per thread spin-up, regardless of `-J-Djruby.thread.pooling=[true|false]'
def test_some_speeds
@runs = 0
def func
@runs += 1
end
(defn append [list1 list2]
(if (empty? list1)
list2
(cons (first list1) (append (rest list1) list2))))
@deobald
deobald / callers.clj
Created June 14, 2011 22:22
Get a meaningful clojure call stack from anywhere.
(defn ignored? [classname]
(let [ignored #{"callers" "dbg" "clojure.lang" "swank" "eval"}]
(some #(s/substring? % classname) ignored)))
(defn callers []
(let [fns (map #(str (.getClassName %))
(-> (Throwable.) .fillInStackTrace .getStackTrace))]
(vec (doall (remove ignored? fns)))))
@deobald
deobald / googlevice.rb
Created September 20, 2011 16:21
mark all texts as read in google voice
#!/usr/bin/env ruby
# this script is pretty shit, really, but if you switch it to delete it's an easy way to
# blast through your texts and clean up your inbox. the problem with it is that gvoice
# can get into an inconsistent state after about a dozen pages.
require 'rubygems'
require 'selenium-webdriver'
def signin
@deobald
deobald / pair.rb
Created February 7, 2014 02:46
pair git commit script
#!/usr/bin/env ruby
# Configures the git author to a list of developers when pair programming
#
# Usage: pair lm bh (Sets the author to 'Luke Melia and Bryan Helmkamp')
# pair (Unsets the author so the git global config takes effect)
#
# Author: Bryan Helmkamp (http://brynary.com)
# http://www.brynary.com/2008/9/1/setting-the-git-commit-author-to-pair-programmers-names
@deobald
deobald / gist:132b1720530f83ea74a0
Created April 20, 2015 12:35
EuroClojure Insane Vipassana Proposal

Abstract (6 sentences max!) *

Many of us love Clojure because it is the first opportunity we've had to write day-job software in a homoiconic ("turtles all the way up") language. This talk will reverse the focus from building up language abstractions to tearing them down -- specifically, the language and imagery of consciousness. We will look at the mechanics of vipassana meditation and then dive into some observations: from the relationship between time, immutability, and observation in the real world, to dissecting our biology as both program and data, to viewing the brain as a branch-predicting meta-circular evaluator built of much simpler instructions yet capable of resolving recursive paradoxes. Is it turtles all the way down? This talk won't necessarily have the answer but it will ask some thought-provoking questions -- and suggest ways to answer those questions.

Category *

Fun

@deobald
deobald / lyles-relay-chat-tokens.txt
Last active March 15, 2018 03:58
Lyle proposes tokens for Relay
Lyle [10 hours ago]
hey @steven think there is value with integrating a block chain into mattermost/relay to create a token that one spends to contribute to a) the overall space’s channel structure and permissioning, and b) actual content contribution. for b), the idea of spending tokens (and thus paying gas) to issue a chat into the channel would ensure that content is moderated properly (as there is a natural incentive to not spam the channel). I could see this type of token moderated channel being useful for gatherings of expensive thought workers (corporate governance, legal, software) where the users of the channel want focused and lean collaboration.
Lyle [10 hours ago]
in the context of a typical user, it could also help in cutting down useless chatter, which is a common complaint about both chat and email. (edited)
steven [2 hours ago]
it's a strange state of affairs that I can't 100% determine how serious you are here, @Lyle

Keybase proof

I hereby claim:

  • I am deobald on github.
  • I am deobald (https://keybase.io/deobald) on keybase.
  • I have a public key ASBsTiUOU--H2PpXyqbbEUyYXTXHQb5LUA1mWU-QOhTu4Ao

To claim this, I am signing this object:

@deobald
deobald / monochromacy-android.md
Last active February 6, 2023 12:23
Installing Tiles for Monochromacy on Andoid
@deobald
deobald / dhamma-org-all-time-hours.md
Last active November 22, 2019 15:05
How to get a full (all-time) summary of hours meditated from the Dhamma.org app

One-time Setup

  1. get the 'adb' binary: install android debug tools

  2. Settings -> About -> Tap Build Number 7 times to enable Developer options

  3. install a version of OpenSSL with zlib support so you can open the android backup

cd ~
curl https://www.openssl.org/source/openssl-1.1.1d.tar.gz -o openssl-1.1.1d.tar.gz