Skip to content

Instantly share code, notes, and snippets.

View aurora's full-sized avatar
🤔
...

Harald Lapp aurora

🤔
...
View GitHub Profile
@aurora
aurora / gist:4107057
Created November 18, 2012 19:34
Riak build notes on UltraSparc-60 64Bit

OpenCWS

The following packages need to be installed before compiling erlang:

  • gcc4core
  • gcc4g++
  • gmake
  • unixodbc, unixodbc_dev
  • libssl_dev
@aurora
aurora / pbstream.erl
Created October 26, 2012 14:41 — forked from adamhunter/pbstream.erl
riak-erlang-client streaming mapreduce examples
-module(pbstream).
-export([load/1, keys/0, bucket/0, map/3, pb_link/0, pb_link/2]).
-define(QUERY, [{map, {modfun, riak_kv_mapreduce, map_object_value}, <<"filter_notfound">>, true}]).
load(HowMany) ->
lists:foreach(fun(Index) ->
BIndex = list_to_binary(integer_to_list(Index)),
RObj = riakc_obj:new(<<"examples">>, <<"key",BIndex/binary>>, <<"Value ",BIndex/binary>>),
@aurora
aurora / gist:3921522
Created October 20, 2012 00:54
Erlang + Riak notes
1. It may be required to install Riak on OSX from source. This may be the case, when Riak is reporting
an error reading "app.config" when trying to start the Riak server after installation.
2. A successfully started Riak server can be tested by visiting the URL http://127.0.0.1:8098/ping, the
port may differ, it can be looked up in the "app.config" file.
3. To connect to Riak from Erlang it's recommended to use the Riak protobuf client which can be
found at: https://github.com/basho/riak-erlang-client
4. When installing the protobuf client the client and all libraries below the "deps/" directory of the
@aurora
aurora / gist:3892372
Created October 15, 2012 13:08 — forked from arcusfelis/gist:1171281
CLDR Collation Erlsom Model
{type,collation,sequence,
[{el,[{alt,suppress_contractions,'collation/SEQ1',[],1,1,false,
undefined},
{alt,special,'collation/SEQ1',[],1,1,false,undefined},
{alt,settings,'collation/SEQ1',[],1,1,false,undefined},
{alt,rules,'collation/SEQ1',[],1,1,false,undefined},
{alt,optimize,'collation/SEQ1',[],1,1,false,undefined},
{alt,base,'collation/SEQ1',[],1,1,false,undefined},
{alt,alias,alias,[],1,1,true,undefined}],
1,1,7}],
@aurora
aurora / counter.py
Created October 13, 2012 17:39 — forked from ericmoritz/counter.py
A counter stored in Riak that handles conflict resolutions on read
import logging
import riak
log = logging.getLogger(__name__)
class RiakCounter(object):
def __init__(self, bucket, key):
self.bucket = bucket
self.bucket.set_allow_multiples(True)
self.key = key
@aurora
aurora / gist:1752747
Created February 6, 2012 15:43
libreadline on osx
perl -i.bak -p -e \
"s/SHLIB_LIBS=.*/SHLIB_LIBS='-lSystem -lncurses -lcc_dynamic'/g" \
support/shobj-conf
./configure
make
sudo make install
@aurora
aurora / gist:1751760
Created February 6, 2012 12:01
gettext on osx lion

Problem:

stpncpy.c:34: error: expected declaration specifiers or ‘...’ before numeric constant
stpncpy.c:34: error: expected ‘)’ before ‘!=’ token
stpncpy.c:34: error: expected ‘)’ before ‘?’ token
make[4]: *** [stpncpy.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all] Error 2

make[2]: *** [all-recursive] Error 1

@aurora
aurora / gist:1688703
Created January 27, 2012 13:12 — forked from plu/gist:1688329
johannes.plunien@localhost /tmp$ git clone https://github.com/aurora/Memcached-Munin-Plugin.git
Cloning into Memcached-Munin-Plugin...
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 20 (delta 9), reused 7 (delta 3)
Unpacking objects: 100% (20/20), done.
johannes.plunien@localhost /tmp$ cd Memcached-Munin-Plugin/
johannes.plunien@localhost /tmp/Memcached-Munin-Plugin[master]$ git co -b mattdeboard-master
Switched to a new branch 'mattdeboard-master'
johannes.plunien@localhost /tmp/Memcached-Munin-Plugin[mattdeboard-master]$ git pull https://github.com/mattdeboard/Memcached-Munin-Plugin.git
@aurora
aurora / sphinx_
Created November 30, 2011 11:48
Munin plugin which monitors Sphinx
#!/bin/bash
=head1 NAME
sphinx - Plugin to monitor various sphinx (searchd) stats
=head1 CONFIGURATION
No configuration
<?php
class a {
protected $msg = 'hallo';
function write() { print $this->msg; }
}
class b extends a {
protected $msg = 'world';
function write() { parent::write(); }