Skip to content

Instantly share code, notes, and snippets.

sorenmacbeth / gcloud-tramp.el
Created October 14, 2020 23:55 — forked from jackrusher/gcloud-tramp.el
Tramping into GCloud instances from within emacs
View gcloud-tramp.el
;; make sure you've set your default project with:
;; gcloud config set project <project-name>
(require 'tramp)
(add-to-list 'tramp-methods
(tramp-login-program "gcloud compute ssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
View nrepl.clj
(ns example.nrepl
(:require [ :refer [start-server stop-server]]
[cider.nrepl :refer [cider-nrepl-handler]])
(defn -main [port]
(let [port (Integer. port)]
(defonce server (start-server :port port :handler cider-nrepl-handler))))
View tuning_storm_trident.asciidoc

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`

Keybase proof

I hereby claim:

  • I am sorenmacbeth on github.
  • I am sorenmacbeth ( on keybase.
  • I have a public key whose fingerprint is 09DB D06A E0D1 1A0F 8E64 0E02 5819 BF09 B48F 7899

To claim this, I am signing this object:

lein cp | tr ':' '\n' > $TMPCP
while read line; do
find "$line" -name "*.jar" -exec sh -c 'jar -tf {}| grep -H --label {} '$1'' \;
done < "$TMPCP"
sorenmacbeth / ambrose.clj
Last active August 29, 2015 13:55
cascalog ambrose integration
View ambrose.clj
(defn ambrose?-
[& bindings]
(let [[name bindings] (flow/parse-exec-args bindings)
bindings (mapcat (partial apply normalize-sink-connection)
(partition 2 bindings))
flow (-> (apply compile-flow name bindings)
server (EmbeddedAmbroseCascadingNotifier.)]
(.addListener flow server)
View bubbleberry-theme.el
(deftheme bubbleberry "bubbleberry")
;; Based on the theme used for LightTable (see: )
'(linum-format " %7i ")
'(fringe-mode 5 nil (fringe))
'(powerline-color1 "#3d3d68")
'(powerline-color2 "#292945")
sorenmacbeth / gist:6049218
Created July 21, 2013 17:19
lmao if your elastic mapreduce jobs don't SIGSEGV the jvm
View gist:6049218
[thread 140515116697344 also had an error]#
[thread 140515116697344 also had an error][thread 140515116697344 also had an error][thread 140515116697344 also had an error]
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV[thread 140515130382080 also had an error][thread 140515130382080 also had an error][thread 140515130382080 also had an error]
View graph.clj
(defrel edge a b)
(def graph [{:id :gen :in [] :out ["a" "b"]}
{:id :plus :in ["a"] :out ["plus"]}
{:id :times :in ["plus"] :out ["times"]}])
(fact edge '{:id :gen :in [] :out ["a" "b"]} '{:id :plus :in ["a"] :out ["plus"]})
(fact edge '{:id :plus :in ["a"] :out ["plus"]} '{:id :times in ["plus"] :out ["times"]})