This file contains 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
*.beam |
This file contains 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
;;; prelude-osx.el --- Emacs Prelude: OSX specific settings. | |
;; | |
;; Copyright © 2011-2015 Bozhidar Batsov | |
;; | |
;; Author: Bozhidar Batsov <bozhidar@batsov.com> | |
;; URL: https://github.com/bbatsov/prelude | |
;; Version: 1.0.0 | |
;; Keywords: convenience | |
;; This file is not part of GNU Emacs. |
This file contains 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(exp_parser). | |
-export([parse/1]). | |
% Parse simple math expressions. | |
% Currently works (for certain definitions of "works") | |
% for addition, subtraction and multiplication. | |
% Eventually it should handle a unary negation operator (~) | |
% The goal is to do the following: | |
% parse("(2 + 3)") => {plus, {num, 2}, {num, 3}} |
This file contains 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 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 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
# for osx users | |
find . -type f \( -name "*.erl" -or -name "*.hrl" -or -name "*.app.src" \) -exec cat {} \; | sed '/^\s*$/d;/^\s*\%\%/d;/^\-spec*/d' | wc -l |
This file contains 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 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 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 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 |
NewerOlder