Skip to content

Instantly share code, notes, and snippets.

Eduardo Gurgel edgurgel

Block or report user

Report or block edgurgel

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

Keybase proof

I hereby claim:

  • I am edgurgel on github.
  • I am edgurgel ( on keybase.
  • I have a public key ASCFFdznd_xIcmqTNu9r9OB470iWR9qAaJi0dOKjeSfpPQo

To claim this, I am signing this object:

edgurgel /
Created Mar 25, 2016 — forked from a-rodin/
Build Ubuntu or Debian packages for nginx with custom patches, configs, and name suffixes in one command
# Author: Alexander Rodin <>
# License: MIT
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
echo "Usage: $0 [options]"
edgurgel / example.ex
Created Oct 10, 2014
Overriding HTTPoison.Base.request/5
View example.ex
defmodule Example do
use HTTPoison.Base
def request(method, url, body \\ "", headers \\ [], options \\ []) do
IO.inspect [method, url, body, headers, options]
super(method, url, body, headers, options)
View gist:cffca0ed68496e0f0fd3
1) test assert received when different message having more than 10 on mailbox (ExUnit.AssertionsTest)
No message matching :hello. Process mailbox (11): {:message, 1}
{:message, 2}
{:message, 3}
{:message, 4}
{:message, 5}
{:message, 6}
{:message, 7}
{:message, 8}
View unusedwarning_test.exs
test "should not give warning?" do
a = "a"
b = "b"
send self, {a, b}
assert_receive {a, b}
# test/unusedwarning_test.exs:8: warning: variable a is unused
# test/unusedwarning_test.exs:8: warning: variable b is unused
View gist:11395715
Hey guys,
Now that ListDict is dead, I'm using List API and I find annoying that we need to specify the key position on the tuple (I know this is not a dict) and I think it would be nice to have position as 0 by default.
My proposal is to have a function with less arguments that call the original with 0. We could have position on the end as optional argument, but this would break people's code and maybe harder to read.
keyreplace(list, key, new_tuple) -> keyreplace(list, key, 0, new_tuple)
This would be keyreplace, keystore, keyfind. Also other functions that already have position on the end could be 0 by default.
edgurgel / wth.rb
Created Mar 28, 2014
WTH 0.0.3 formula
View wth.rb
require "formula"
class ErlangInstalled < Requirement
fatal true
default_formula 'erlang'
env :userpaths
satisfy {
erl = which('erl') and begin
View rest-cowboy
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "">
<svg width="12cm" height="13cm" viewBox="7 9 231 243" xmlns="" xmlns:xlink="">
<g id="Background">
<polygon style="fill: #dbedf3; fill-opacity: 1" points="179.156,28.429 195.383,33.3794 179.156,38.3297 162.929,33.3794 "/>
<polygon style="fill: none; stroke-opacity: 1; stroke-width: 0.2; stroke: #000000" points="179.156,28.429 195.383,33.3794 179.156,38.3297 162.929,33.3794 "/>
<text font-size="1.6" style="fill: #000000; fill-opacity: 1;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="179.156" y="33.8794">
<tspan x="179.156" y="33.8794">previously_existed/2</tspan>
  • Brennar:

    • v.t.d. o ato de derrubar, derramar, algo ou alguma coisa sem a intenção do praticante da ação. Isso serve pra qualquer coisa água, almoço (ex. Brennou yourself <- sempre ocorre), café (mais costumeiramente).
  • Joiçar:

    • v.t.i. O ato de ficar até tarde no escritório; ou
    • v.t.i. Ficar mechendo no celular o tempo todo, principalmente em eventos sociais; ou
    • v.t.i. Não tomar café e/ou almoçar; ou
    • v.t.d. Brigar com Mateus porque ele sempre Mateusa (vide Mateusar) com o que eu falo ¬¬
  • Halanzar:

View rebar2.ex
@doc """
Loads the rebar.config and evaluates rebar.config.script if it
exists in the given directory.
def load_config(dir) do
config_path = Path.join(dir, "rebar.config")
script_path = Path.join(dir, "rebar.config.script")
config = case :file.consult(config_path) do
{ :ok, config } ->
You can’t perform that action at this time.