Skip to content

Instantly share code, notes, and snippets.

💭
Engineerd

John Axel Eriksson johnae

View GitHub Profile
@johnae
johnae / keybase.md
Created Dec 14, 2018
Keybase proof
View keybase.md

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:

View README.md

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 / README.md
Last active Dec 3, 2015
OSX Notifier
View README.md

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 / install.sh
Last active Sep 1, 2015
Install latest spook version
View install.sh
#!/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 Dec 3, 2015
Tmux notifier
View README.md

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 / gist:1389300
Created Nov 23, 2011
Output for "corrupt" file in luwak
View gist:1389300
(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},
View gist:459865
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)) || {}) : {}
You can’t perform that action at this time.