Skip to content

Instantly share code, notes, and snippets.

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

Harald Lapp aurora

🤔
...
View GitHub Profile
@aurora
aurora / nord_modular_osx.md
Created April 26, 2017 21:02 — forked from arirusso/nord_modular_osx.md
Use the original Nord Modular Editor with OSX

Use the original Nord Modular Editor with OSX

Required

  • Homebrew

Compatibility

Confirmed working with

config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf")
config_files.each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.open(file).each do |line|
if line.start_with?('#viscosity name')
SUMMARY
I like to use kcachegrind for doing profiling on my ruby code. Most of my development
is done on OSX, and while you can install kcachegrind via macports, it takes forever
because it has to build KDE, as well. Much to my surprise, the fine folks who
wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on
OSX without too much effort, only having to install QT and GraphViz. Yippie!
I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure
it will build just fine on earlier versions of Xcode, but I haven't tested it.
@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: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: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