Skip to content

Instantly share code, notes, and snippets.


Emanuele DelBono emadb

Block or report user

Report or block emadb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
emadb / foo.exs
Last active Jan 20, 2020
Tramp data in Elixir
View foo.exs
defmodule Foo do
def execute_command(data, coeff) do
data = prepare_data(data, coeff)
persist(, coeff)
def prepare_data(data, coeff) do
w = calculate_w(data.x, data.y, data.z, coeff)
name: "foo",
View fizzbuzz.cs
using System;
using System.Linq;
using System.Collections.Generic;
namespace CodicePlastico
public class FizzBuzz
private static readonly IDictionary<int, string> _cases = new Dictionary<int, string>
{3, "fizz"},
emadb / fizz_buzz.exs
Last active Aug 8, 2019
FizzBuzz in Elixir using only functions: no numbers, no strings, no loops and no ifs!
View fizz_buzz.exs
defmodule Church do
def fizzbuzz do
(fn k -> fn f -> ((fn f -> (fn x -> f.(fn y -> x.(x).(y) end) end).(fn x -> f.(fn y -> x.(x).(y) end) end) end).(
fn f -> fn l -> fn x -> fn g ->
(fn b -> b end).((fn p -> p.(fn a -> fn b -> a end end) end).(l)).(x).(fn y -> g.(f.((fn l -> (fn p -> p.(fn a -> fn b -> b end end) end)
.((fn p -> p.(fn a -> fn b -> b end end) end).(l)) end).(l)).(x).(g)).((fn l -> (fn p -> p.(fn a -> fn b -> a end end) end)
.((fn p -> p.(fn a -> fn b -> b end end) end).(l)) end).(l)).(y) end)
end end end end
)).(k).((fn x -> fn y -> fn f -> f.(x).(y) end end end).(fn x -> (fn y -> x end) end).(fn x -> (fn y -> y end) end))
emadb / DynamicBinderExtensions.cs
Last active Aug 16, 2018 — forked from thecodejunkie/DynamicModelBinder.cs
A DynamicModelBinder for NancyFx ( It convert your request data (form, body, querystring) into a dynamic model. This means that you don't have to create all your useless DTO. NOTE. The original version is here (thecodejunkie). I simply add the support for deserialize the request …
View DynamicBinderExtensions.cs
public static class DynamicBinderExtensions
public static dynamic DynaBind(this INancyModule module)
return module.Bind<DynamicDictionary>();
emadb / Dispatcher.js
Last active Oct 10, 2017
medium - react and redux
View Dispatcher.js
const dispatcher = {
subscribers: [],
register(subscriber) {
dispatch(action) {
this.subscribers.forEach(s => s(action))
View gist:9d6adbeaeb8f924f9a07b86f7269929e
### Keybase proof
I hereby claim:
* I am emadb on github.
* I am emadb ( on keybase.
* I have a public key whose fingerprint is 8F39 3A1D 85DC 83C7 B8C8 BDDE B295 AE38 057C 4B76
To claim this, I am signing this object:
View gist:906a5fee800480e079f2
/*jslint node: true */
"use strict";
module.exports = function (grunt) {
emadb / eslint.config.js
Last active Oct 28, 2016
My Eslint configuration
View eslint.config.js
{"rules": {
/* best practices */
"accessor-pairs": 0,
// enforces return statements in callbacks of array's methods
"array-callback-return": 2,
// treat var statements as if they were block scoped
"block-scoped-var": 2,
// specify the maximum cyclomatic complexity allowed in a program
emadb / index.html
Last active Sep 15, 2016
JS Bin - Reactjs bootstrap modal example // source,js,output
View index.html
<!DOCTYPE html>
<meta name="description" content="Reactjs bootstrap modal example">
<script src=""></script>
<script src=""></script>
<link href="" rel="stylesheet" type="text/css" />
<script src=""></script>
<script src=""></script>
<meta charset="utf-8">
emadb /
Created May 20, 2016
Sublime Text Shorcuts

##Text Editing

  • Insert line before - Cmd + Shift + Return
  • Insert line after - Cmd + Return
  • Delete the word backward - Option + Delete
  • Delete the word forward - fn + Option + Delete
  • Delete to beginning of the line - Cmd + Delete
  • Delete to end of the line - Ctrl + K
  • Delete word back - Option + Delete
  • Delete word forward - fn + Option + Delete
  • Soft undo - Cmd + U
You can’t perform that action at this time.