Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am caligin on github.
  • I am caligin (https://keybase.io/caligin) on keybase.
  • I have a public key whose fingerprint is 6897 DE5F D543 F3DA 02C1 3FEA 7AD2 E918 B3D5 FFB7

To claim this, I am signing this object:

@caligin
caligin / 1-UserProfile.java
Created April 21, 2015 16:31
From Class to State+Functions
// Start from a class, that is state and behaviour together
class UserProfile {
private String username;
private String password;
private Date lastLogIn;
private boolean isLoggedIn;
public UserProfile( String username,
String password,
@caligin
caligin / fib_proc.erl
Last active August 29, 2015 14:19
Erlang - Fibonacci with processes example
-module(fib_proc).
-export([fib/2]).
-export([start/0]).
-export([start_link/0]).
%% start will be executed in the calling process,
%% creating a new one where the function init/0,
%% that represents the entry point of the "fibonacci
%% service" will be run. Returns the Pid of the newly
%% created process.