Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am efrenfuentes on github.
  • I am efrenfuentes ( on keybase.
  • I have a public key ASCaO5Z69pzBybyGSsWGl8U81z0J4qSyTn6x5NyNboCDfgo

To claim this, I am signing this object:

View ascii.txt
( )
( )
efrenfuentes / my_app.ex
Created May 19, 2020 — forked from alanpeabody/my_app.ex
Websockets in Elixir with Cowboy and Plug
View my_app.ex
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
efrenfuentes /
Created Mar 28, 2020 — forked from endolith/
GCD and LCM functions in Python for several numbers
# Greatest common divisor of 1 or more numbers.
from functools import reduce
def gcd(*numbers):
Return the greatest common divisor of 1 or more integers
set -e
efrenfuentes / Phoenix
Created Dec 13, 2019 — forked from odyright/Phoenix
Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin
View Phoenix

Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

User model bootstrap

Let's generate User model and controller.

mix ecto.create
mix phoenix.gen.json Accounts User users email:string password_hash:string
efrenfuentes / bancos
Created Oct 11, 2019 — forked from xombra/bancos
Codigo y Bancos correspondientes de Venezuela
View bancos
<select name="banco">
<option value=""></option>
<option value="0156">100%BANCO</option>
<option value="0196">ABN AMRO BANK</option>
<option value="0172">BANCAMIGA BANCO MICROFINANCIERO, C.A.</option>
<option value="0171">BANCO ACTIVO BANCO COMERCIAL, C.A.</option>
<option value="0166">BANCO AGRICOLA</option>
<option value="0175">BANCO BICENTENARIO</option>
<option value="0128">BANCO CARONI, C.A. BANCO UNIVERSAL</option>

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

efrenfuentes / main.go
Created Jun 5, 2018 — forked from walm/main.go
Simple Golang DNS Server
View main.go
package main
import (
efrenfuentes / md5-example.go
Created May 12, 2018 — forked from sergiotapia/md5-example.go
Golang - How to hash a string using MD5.
View md5-example.go
import (
func GetMD5Hash(text string) string {
hasher := md5.New()
return hex.EncodeToString(hasher.Sum(nil))