Skip to content

Instantly share code, notes, and snippets.

decode_element(Stream) ->
decode_element(Stream, <<"">>).
decode_element(<<>>, Output) -> Output;
decode_element(<<$&,$l,$t,$;,Rest/binary>>, Output) ->
decode_element(Rest, <<Output/binary, $<>>);
decode_element(<<$&,$g,$t,$;,Rest/binary>>, Output) ->
decode_element(Rest, <<Output/binary, $>>>);
decode_element(<<E:1/binary, Rest/binary>>, Output) ->
decode_element(Rest, <<Output/binary, E/binary>>).
!(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
-module(nfp_bank_atm).
-behaviour(gen_server).
%% API
-export([start_link/0,
create_account/1,
deposit/2,
withdraw/2,
delete_account/1]).
-module(my_server).
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
Pixels = <<213,45,132,64,76,32,76,0,0,234,32,15>>,
RGB = [ {R,G,B} || <<R:8,G:8,B:8>> <= Pixels ].
#!/bin/bash
gcc -undefined dynamic_lookup -dynamiclib -D OCI_IMPORT_LINKAGE -D OCI_CHARSET_ANSI -L/usr/local/oracle/instantclient_10_2/ -lclntsh -L/usr/local/lib -locilib -L/usr/local/Cellar/erlang/R14B04/lib/erlang/usr/include/ prophet.c -o prophet.so
(into {}
(for [[k v] orig-map]
[(keyword k) v]))
create table
foo
(
bool_baz int not null,
constraint
chk_bool_baz
check((bool_baz is not null and bool_baz in (1,0)))
);
Line 97:
case re:run(Key, "^(\\w+)(?:\\[([\\w\\[\\]]+)\\]|\\[\\])?$", [{capture, all_but_first, list}]) of
Line 91:
find_deep_post_param([Index|Rest], Params) when is_list(Index) ->
find_deep_post_param(Rest,case proplists:get_values(Index, Params) of
[V] -> V;
V -> V
#!/usr/env perl -w
use LWP;
use strict;
my $browser = LWP::UserAgent->new;
my $payload = <<EOF;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Query>
<Query header="0" formatter="TSV" virtualSchemaName="default" count="" uniqueRows="1" datasetConfigVersion="0.6">