Skip to content

Instantly share code, notes, and snippets.

View noss's full-sized avatar

Christian noss

  • Stockholm, Sweden
View GitHub Profile
-module(mysql_proto_constants).
-compile(export_all).
client_flags() ->
[{long_password, 1, "new more secure passwords"}
,{found_rows, 2, "Found instead of affected rows"}
,{long_flag, 4, "Get all column flags"}
,{connect_with_db, 8, "One can specify db on connect"}
,{no_schema, 16, "Don't allow database.table.column"}
,{compress, 32, "Can use compression protocol"}
@noss
noss / zohan.erl
Created September 12, 2008 21:08 — forked from anonymous/gist:10515
-module(zohan).
-export([generate_dir/1]).
generate_dir(Filename) ->
<<A:12, B:12, _/binary>> = erlang:md5(Filename),
filename:join([queue,
io_lib:format("~3.16.0b", [A]),
io_lib:format("~3.16.0b", [B])]).