Skip to content

Instantly share code, notes, and snippets.

View johnae's full-sized avatar
🤡
Engineer

John Axel Eriksson johnae

🤡
Engineer
View GitHub Profile
require 'nanite'
require 'eventmachine'
include Nanite::CommonConfig
options = {}
# config should be put in config/nanite.yml
config_file = File.expand_path(File.join(Rails.root, 'config', 'nanite.yml'))
custom_config = File.exists?(config_file) ? (YAML.load(IO.read(config_file)) || {}) : {}
@johnae
johnae / gist:1389300
Created November 23, 2011 17:30
Output for "corrupt" file in luwak
(riak@riak-001.int.eu.example.com)4> {ok, TLObj} = C:get(<<"luwak_tld">>, <<"<file_name_deleted>">>, 2).
{ok,{r_object,<<"luwak_tld">>,
<<"<file_name_deleted>">>,
[{r_content,{dict,2,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],...}}},
[{attributes,{dict,2,16,16,8,80,48,
{[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],...}}}},
{block_size,1000000},
@johnae
johnae / README.md
Last active December 3, 2015 16:27
Tmux notifier

This is the tmux notifier I use for spook (a guard replacement - eg. watch for changes and run something). Clone this gist to:

~/.spook/notifiers/tmux

like so:

cd ~
@johnae
johnae / install.sh
Last active September 1, 2015 13:51
Install latest spook version
#!/usr/bin/env bash
### This will download the latest release and put it in PREFIX, the default is /usr/local
### You can run the remote script locally like this:
### curl https://gist.githubusercontent.com/johnae/6fdc84ea7d843812152e/raw/install.sh | PREFIX=~/Local bash
defined () {
[[ ${!1-X} == ${!1-Y} ]]
}
@johnae
johnae / README.md
Last active December 3, 2015 16:26
OSX Notifier

This is an example OS X notifier that can be used with spook (a guard replacement - eg. watch for changes and run something). Clone this gist to:

~/.spook

like so:

cd ~
@johnae
johnae / README.md
Last active December 3, 2015 16:27

This is an example Ubuntu notifier that can be used with spook (a guard replacement - eg. watch for changes and run something). Clone this gist to:

~/.spook/notifiers/ubuntu

like so:

cd ~
@johnae
johnae / keybase.md
Created December 14, 2018 05:41
Keybase proof

Keybase proof

I hereby claim:

  • I am johnae on github.
  • I am johnae (https://keybase.io/johnae) on keybase.
  • I have a public key ASD9teBX66WaVWQ8_QS9nrz-QuJO5Tjd5RpcV8rBGB1WEAo

To claim this, I am signing this object: