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 / index.js
Last active August 29, 2015 14:11
requirebin sketch
var hyperquest = require('hyperquest');
hyperquest('http://www.reddit.com/comments/2ili8a').pipe(process.stdout);
@edrex
edrex / Examples.md
Last active August 29, 2015 14:18
tank helper command for working with the TiddlyWeb API at https://tank.peermore.com/

Examples

export TANK_KEY="my tank key"

tank GET /bags

cat | tank PUT /bags/myNewBag Content-Type:'application/vnd.tiddlyweb+json
@edrex
edrex / README.md
Created May 6, 2015 00:55
Upstart and Systemd examples

Here are examples of Upstart jobs (Ubuntu) and Systemd units (RHEL7, Arch, CoreOS).

They should be complete enough to get you started.

There are some shell commands needed in each case too:

...

@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* . &&

@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>
docker run -t -p 8888:8888 -v ~/ipython_notebooks:/home/condauser/notebooks -i rothnic/anaconda-notebook
@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) {
;; -*- 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
localhost
log access.log
proxy /echo 127.0.0.1:2015/p {
websocket
}
websocket /p/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
}