Skip to content

Instantly share code, notes, and snippets.

View rodrigo-brito's full-sized avatar
🇧🇷
You are what you share

Rodrigo Brito rodrigo-brito

🇧🇷
You are what you share
View GitHub Profile
@rodrigo-brito
rodrigo-brito / binance_ccxt.py
Created July 28, 2019 22:16
CCXT - Binance example of usage
class Binance:
def __init__(self, key, secret, test=False):
self.exchange = ccxt.binance({
'apiKey': key,
'secret': secret,
'enableRateLimit': True,
})
self.test = test
def buy(self, symbol, amount):
@rodrigo-brito
rodrigo-brito / caddyproxy_mkcert.Caddyfile
Created October 18, 2018 11:08
Caddy proxy with HTTPS - Mkcert
id.cifraclub.com.br {
log stdout
# Mkcert - https://github.com/FiloSottile/mkcert
tls ./yourwebsite.com.br.pem ./yourwebsite.com.br-key.pem
proxy / https://yourwebsite.com {
transparent
header_upstream X-Marotagem true
header_upstream Host "yourwebsite.com.br"
}
package refdiff.examples;
import java.io.File;
import refdiff.core.RefDiff;
import refdiff.core.diff.CstDiff;
import refdiff.core.diff.Relationship;
import refdiff.parsers.go.GoPlugin;
public class RefDiffExampleGo {
@rodrigo-brito
rodrigo-brito / reverse_proxy.go
Created October 18, 2018 11:10
Go reverse proxy
package main
import (
"fmt"
"net/http"
"net/http/httputil"
"net/url"
)
func main() {
@rodrigo-brito
rodrigo-brito / autoexec.cfg
Last active July 7, 2018 12:10
My CS:GO Config
echo "executando..."
// inicialization: -freq 60 -console -novid -nojoy -high -w 1280 -h 960 -threads 8 -tickrate 128 +snd_use_hrtf 0 +exec autoexec.cfg
//---------------------
// Clear
//---------------------
clear
clear_anim_cache
clear_debug_overlays
"terminal.integrated.fontFamily": "Source Code Pro for Powerline",
"git.autofetch": false,
"go.formatTool": "goimports",
"go.lintOnSave": "off",
"go.gotoSymbol.includeImports": true,
"go.docsTool": "gogetdoc",
"go.useLanguageServer": true,
"go.gocodeAutoBuild": true,
"go.buildOnSave": "package",
"go.useCodeSnippetsOnFunctionSuggest": true,
#!/bin/sh
ROOT_DIR=/var/www/project
GIT_WORK_TREE=$ROOT_DIR git checkout -f
cd $ROOT_DIR
./post-receive
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
line := fscanner.Text()
}
# List of files filtered by other file
git ls-files | grep -Fv -f ignore.txt
version: '3.1'
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
phpmyadmin:
image: phpmyadmin/phpmyadmin
depends_on: