Skip to content

Instantly share code, notes, and snippets.

View russelldb's full-sized avatar

Russell Brown russelldb

View GitHub Profile
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).
%%
http:request(get, {"http://hostname/resource", [{"Authorization", "Basic " ++ base64:encode_to_string("username:password")}]}, [], []).
-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>
rm -rf ~/.bash_history
history -c
%% Thanks to Ulf Wiger, here http://lists.basho.com/pipermail/rebar_lists.basho.com/2010-October/000274.html
gen_event:delete_handler(error_logger,sasl_report_tty_h,swap).
gen_event:add_handler(error_logger,sasl_report_tty_h,error).
@russelldb
russelldb / TestConcurrentClient.java
Created February 14, 2011 18:28
Shows that the limiter to concurrency is the Max Hosts Per Connection not
/**
*
*/
package brown.russell.httpclient.TestConcurrentClient;
import static org.junit.Assert.assertEquals;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;