Skip to content

Instantly share code, notes, and snippets.

View renanbastos93's full-sized avatar
πŸ„β€β™‚οΈ
Free times I go surfing usually

Renan Bastos renanbastos93

πŸ„β€β™‚οΈ
Free times I go surfing usually
View GitHub Profile
@crgimenes
crgimenes / main.go
Created May 21, 2020 21:11
Detect server and client ip and port
package main
import (
"fmt"
"net"
"net/http"
"github.com/gorilla/mux"
)
@Biazus
Biazus / builder.py
Created March 21, 2020 23:55
Sample of builder design pattern
#!/usr/bin/env python3
from abc import ABC, abstractmethod
class AbstractEdgeBuilder(ABC):
@abstractmethod
def build_edge(self):
pass
@faelp22
faelp22 / main.go
Last active July 25, 2024 13:11
Um simples proxy reverso feito em Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
@Biazus
Biazus / abstract_factory_azion.py
Last active March 12, 2020 18:32
Sample of abstract factory by Miller Biazus
#!/usr/bin/env python3
from abc import ABC, abstractmethod
class AbstractFunction(ABC):
@abstractmethod
def install_function(self):
pass
@nbari
nbari / gist:386af0fa667ae03daf3fbc80e3838ab0
Created July 2, 2016 07:56 — forked from juanqui/gist:7564275
Golang Kqueue Snippet
// helpful links:
// https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/EV_SET.2.html
// http://julipedia.meroh.net/2004/10/example-of-kqueue.html
// create kqueue
kq, err := syscall.Kqueue()
if err != nil {
log.Println("Error creating Kqueue descriptor!")
return
}
@parmentf
parmentf / GitCommitEmoji.md
Last active June 5, 2025 22:09
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug:
@boniattirodrigo
boniattirodrigo / removerAcentosECaracteresEspeciais.py
Last active December 28, 2023 18:38
Remover acentos e caracteres especiais em Python
import unicodedata
import re
"""
A remoΓ§Γ£o de acentos foi baseada em uma resposta no Stack Overflow.
http://stackoverflow.com/a/517974/3464573
"""
def removerAcentosECaracteresEspeciais(palavra):
@TheGU
TheGU / uploader.go
Created September 11, 2015 10:07
Golang to upload file to google drive with progress bar using Google API
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@vsouza
vsouza / .bashrc
Last active May 27, 2025 06:43
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin