Skip to content

Instantly share code, notes, and snippets.

@lehoff
lehoff / pb_decode.erl
Created October 5, 2016 03:21
Potentially more efficient PB decoding
-module(pb_decode).
-compile(export_all).
%% existing code
d_msg_rpberrorresp(Bin, TrUserData) ->
dfp_read_field_def_rpberrorresp(Bin, 0, 0,
id(undefined, TrUserData),
id(undefined, TrUserData), TrUserData).
-module(mrts).
-compile([export_all]).
%-----------------------------------------------------------------------
% Buckets we know about
%-----------------------------------------------------------------------
bucket() ->
{<<"ts_weather_demo">>,<<"ts_weather_demo">>}.
@lehoff
lehoff / .vimrc
Created October 8, 2015 21:22
LeHoff's .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@lehoff
lehoff / gist:91fd24e40a63f7670e00
Created September 17, 2015 14:06
relx error while generating a release for riak_core with erlang.mk - branch th/erlang.mk
ogma:riak_core th$ relx
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
/Users/th/gitrepos/basho/riak_core/ebin
/Users/th/gitrepos/basho/riak_core/deps
/Users/th/erlang/r1602_basho8/lib
/Users/th/Library/Erlang/lib
=ERROR REPORT==== 17-Sep-2015::16:05:23 ===
Error in process <0.116.0> with exit value: {function_clause,[{rlx_app_info,parse_version,[git],[{file,"/Users/th/gitrepos/relx/_build/default/lib/relx/src/rlx_app_info.erl"},{line,197}]},{rlx_app_info,new,6,[{file,"/Users/th/gitrepos/relx/_build/default/...
@lehoff
lehoff / start-riak-core-without-using-a-release.txt
Created August 21, 2015 06:46
Short description of how to start riak_core without using a release
# Start riak_core without using a release
When working with riak_core as a dependency the standard way of starting things is through a release.
Sometimes a release is a bit heavy to work with, so how do you start it up from the shell?
This requires a number of things to be configured correctly.
You should use rebar, not rebar3, for this particular way of doing it.
The application `kore` is using riak_core as a dependency and when everything is configured correctly you can start the application with these steps:
@lehoff
lehoff / extensions.el
Last active August 17, 2019 15:16
mu4e configuration layer
(defvar mu4e-pre-extensions
'(
mu4e
))
(defun mu4e/init-mu4e ()
(use-package mu4e
:init
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")