Skip to content

Instantly share code, notes, and snippets.

View edrex's full-sized avatar

Eric Drechsel edrex

  • Portland, OR
View GitHub Profile
@edrex
edrex / .zprofile
Created February 13, 2016 22:17
ZSH e(dit) and p(roject) commands
export EDITOR='emacsclient -t'
# Handy e command to edit in already open emacs
alias e='emacsclient -nc'
printEntryPoint() {
entryPoints=("README.md" "package.json");
for name in "${entryPoints[@]}"; do
[[ -a "$name" ]] && echo "$name" && return
done
localhost
log access.log
proxy /echo 127.0.0.1:8080 {
websocket
}
localhost
log access.log
websocket /echo cat
@edrex
edrex / Caddyfile
Last active February 10, 2016 01:34
localhost
log access.log
proxy /echo http://127.0.0.1:2016 {
websocket
}
localhost
log access.log
proxy /echo 127.0.0.1:2015/p {
websocket
}
websocket /p/echo cat
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@edrex
edrex / index.js
Last active September 10, 2015 20:13
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var net = require('net');
var socket = net.connect({
host: 'localhost',
port: 64080
});
socket.on('error', function (err) {
docker run -t -p 8888:8888 -v ~/ipython_notebooks:/home/condauser/notebooks -i rothnic/anaconda-notebook
@edrex
edrex / index.html
Last active August 29, 2015 14:21
Quick ES6 + SystemJS code sharing http://bl.ocks.org/edrex/9ad2e2f3f84ae6074239
<!doctype html>
<html>
<head>
<title>Hi</title>
</head>
<body>
<p>This gist is a quick way to try out and share ES6 code samples using <a href="https://gist.github.com/">Github Gist</a> and <a href="http://bl.ocks.org/">bl.ocks.org</a></p>
<p>It points at the latest System.js and Babel and loads packages through the JSPM CDN.</p>
<p>I've mangled the import paths so it imports from npm by default.</p>
@edrex
edrex / Automatically start Camlistore at login on OSX.md
Last active January 6, 2017 14:35
Automatically start Camlistore at login on OSX

I store my documents in a Camlistore, with a local instance running on my workstation and sync to an s3 bucket and a fixed server. Since I set this up 2 years ago, I've been manually starting camlistored and cammount inside a tmux session each time I log in to OSX.

Today I finally got around to setting up these processes to to start using the native OSX facility, launchd plists.

Steps:

  • camlistored and cammount should be in /usr/local/bin. I have them symlinked via

cd /usr/local/bin && ln -s ~/go/camlistore.org/bin/cam* . &&