Skip to content

Instantly share code, notes, and snippets.

View russelldb's full-sized avatar

Russell Brown russelldb

View GitHub Profile
@russelldb
russelldb / ML.md
Created June 10, 2014 16:14 — forked from bsparrow435/ML.md

Step 1: From you logs I have decoded the bucket/key

binary_to_term(<<131,109,0,0,0,9,85,114,108,84,111,83,99,97,110>>).
<<"UrlToScan">>
binary_to_term(<<131,109,0,0,0,61,104,116,116,112,37,51,97,37,50,102,37,50,102,119,119,119,46,97,110,104,114,105,46,110,101,116,37,50,102,37,51,102,102,101,101,100,37,51,100,114,115,115,50,37,50,54,97,109,112,37,51,98,112,37,51,100,55,51,49,49,48>>).
<<"http%3a%2f%2fwww.anhri.net%2f%3ffeed%3drss2%26amp%3bp%3d73110">>

Step 2: Please run the below snippits from riak attach to identify the owning partitions of this bucket/key

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@russelldb
russelldb / ifelse.erl
Last active August 29, 2015 14:26 — forked from seancribbs/ifelse.erl
IF / ELSE in erlang, via parse_transform. EVIL, DO NOT USE
%% @doc A VERY EVIL parse_transform that allows two things:
%%
%% 1) The use of 'else' instead of 'true' in the final clause of an if
%% expression.
%%
%% 2) Automatic extraction of non-guard expressions into
%% anonymous variables that can then be used directly in the clause
%% guards.
%%
%% Until Erlang actually implements the 'cond' construct, this is a
package uk.co.****.****.presentation.web.util.jawr;
import net.jawr.web.resource.bundle.postprocess.ResourceBundlePostProcessor;
import net.jawr.web.resource.bundle.postprocess.BundleProcessingStatus;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import javax.servlet.ServletContext;
/**
%%% File : recomendations.erl
%%% Author : Russell Brown <russell@pango.lan>
%%% Description : The first chapter of Programming Collective Inteligence, but in elrang, like.
%%% Created : 15 Jun 2009 by Russell Brown <russell@pango.lan>
-module(recomendations).
-compile(export_all).
%%
-module(change).
-compile(export_all).
count_change(Amount, CoinSet) ->
FList = lists:sort(CoinSet),
Fd = fun(X) ->
lists:nth(X, FList) end,
cc(Amount, length(CoinSet), Fd).
/**
*
*/
package net.ossme.test.util;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import org.easymock.classextension.EasyMock;

How to create, build and run an OTP application using Rebar

Get Rebar from bitbucket.org

hg clone http://hg.basho.com/rebar/

Build Rebar

  ./bootstrap 
==> rebar (compile)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WindowSettings</key>
<array>
<dict>
<key>BackgroundImagePath</key>
<string>/Library/Desktop Pictures/Ripples Blue.jpg</string>
<key>Columns</key>