This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>>). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ | |
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(nfp_bank_atm). | |
-behaviour(gen_server). | |
%% API | |
-export([start_link/0, | |
create_account/1, | |
deposit/2, | |
withdraw/2, | |
delete_account/1]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pixels = <<213,45,132,64,76,32,76,0,0,234,32,15>>, | |
RGB = [ {R,G,B} || <<R:8,G:8,B:8>> <= Pixels ]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(into {} | |
(for [[k v] orig-map] | |
[(keyword k) v])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table | |
foo | |
( | |
bool_baz int not null, | |
constraint | |
chk_bool_baz | |
check((bool_baz is not null and bool_baz in (1,0))) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"> |