Skip to content

Instantly share code, notes, and snippets.

View samof76's full-sized avatar
🐒
Swinging branches

Samuel Vijaykumar M samof76

🐒
Swinging branches
View GitHub Profile
@samof76
samof76 / createdir.sh
Created June 3, 2011 10:29
Erlang Install Steps
sudo mkdir /opt/erlang
sudo chown sam:sam -R /opt/erlang
@samof76
samof76 / workingdircreate.sh
Created June 3, 2011 10:41
Erlang Install - Creation of Working directory
$ sudo mkdir -p /opt/erlang
$ sudo chown sam:sam -R /opt/erlang
@samof76
samof76 / downloadtarball.sh
Created June 3, 2011 10:42
Erlang Install - Download Tarball
$ cd /opt/erlang
$ wget http://www.erlang.org/download/otp_src_R14B02.tar.gz
@samof76
samof76 / extract.sh
Created June 3, 2011 10:44
Erlang Install - Extract Tarball
$ tar -xzvf otp_src_R14B02.tar.gz
@samof76
samof76 / install.sh
Created June 3, 2011 10:46
Erlang Install - Install
$ mkdir R14B02
$ cd otp_src_R14B02
$ ./configure --prefix=/opt/erlang/R14B02
$ make ; make instal
@samof76
samof76 / link.sh
Created June 3, 2011 10:48
Erlang Install - Link Directory creation
@samof76
samof76 / erlrc.sh
Created June 3, 2011 10:51
Erlang Install - Setup environment variables
$ export ERL_HOME=/opt/erlang/current
$ export PATH=$ERL_HOME/bin:$PATH
$ export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH
@samof76
samof76 / erlrc
Created June 3, 2011 10:53
Erlang Install - Resource File
export ERL_HOME=/opt/erlang/current
export PATH=$ERL_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH
@samof76
samof76 / fact.erl
Created June 3, 2011 11:05
Erlang Install - Sample
-module(fact). % This is the file 'fact.erl', the module and the filename MUST match
-export([fac/1]). % This exports the function 'fac' of arity 1 (1 parameter, no type, no name)
fac(0) -> 1; % If 0, then return 1, otherwise (note the semicolon ; meaning 'else')
fac(N) when N > 0, is_integer(N) -> N * fac(N-1).
% Recursively determine, then return the result
% (note the period . meaning 'endif' or 'function end')
@samof76
samof76 / redis.conf
Last active December 23, 2015 17:09
Sample Redis configuration
daemonize yes
pidfile /var/run/redis/redis-server.pid
port 6379
bind 0.0.0.0
timeout 0
loglevel notice
logfile /var/log/redis/redis-server.log
databases 16
save 900 1
save 300 10