Skip to content

Instantly share code, notes, and snippets.

@willguitaradmfar
willguitaradmfar / .bashrc
Created June 30, 2022 12:41
Utilitário para configurar o arquivo `.enter.sh` nos projetos
function cd()
{
if [ -f .exit.sh ]; then
source .exit.sh;
fi
if [ -z $* ]; then
builtin cd ~
else
builtin cd "$*"

Financial Calendar

Use

curl -fsSL https://gist.githubusercontent.com/willguitaradmfar/b45372e877a5bc7c5e202fdf112e32b7/raw/28b17212b01841d1f9f56569cf9f3f2aa91fdaf6/cal.sh | sh -
{
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-nyc1.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-nyc2.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-nyc3.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-ams2.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-ams3.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-sfo1.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-sfo2.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-sfo3.digitalocean.com/
curl -w "%{url_effective};%{time_connect}\n" -o /dev/null -s http://speedtest-sgp1.digitalocean.com/
@willguitaradmfar
willguitaradmfar / leilao.js
Last active June 2, 2020 16:38
Leilão de carros
// https://virtusmotaleiloes.com/
var run = (meuLogin = 'seuLogin', tempoRestanteSegundos = 30, valorLimite = 30000) => {
document.querySelector('#box_info_leilao li:nth-child(2) a').click()
let history = Array.from(document.querySelectorAll('#box_info_leilao li:nth-child(5) tbody tr'))
if(!history.length) return
history = history
#Expose docker api
sudo vim /lib/systemd/system/docker.service ==> "-H tcp://172.17.0.1:2375"
# adicionar a variavel no arquivo gitlab-ci.yml
variables:
DOCKER_HOST: tcp://172.17.0.1:2375/
DOCKER_DRIVER: overlay2
# registrar runner no gitlab
version: "3"
services:
redis:
image: redis
restart: always
ports:
- 127.0.0.1:6379:6379
rabbitmq:
image: rabbitmq:3-management
function resgatar() {
location.href = 'https://www.loteriasonline.caixa.gov.br/silce-web/#/apostas'
setTimeout(function () {
document.querySelector('.conferir_aposta').click()
setTimeout(function () {
document.querySelector('.conferir_aposta').click()
setTimeout(function () {
#property copyright "willguitaradmfar@gmail.com <William Lima Pereira>. Copyright 2019."
#property version "1.00"
enum ESTRATEGIA_ENTRADA
{
APENAS_MM,
APENAS_ALIGATOR,
MM_E_ALIGATOR
};
//@version=2
study("TRADE.GOD", shorttitle="TRADE.GOD", overlay=true)
phi = 0.001
calculate() =>
last=security(tickerid, '60', close[1])
actual=security(tickerid, '60', close)
result=actual-last
p=result/last
@willguitaradmfar
willguitaradmfar / http-request mapfile redirects
Created July 31, 2019 18:04
http-request mapfile redirects
#add line on haproxy.cfg
http-request redirect location %[capture.req.uri,map(/etc/haproxy/redirects.map)] code 301 if { capture.req.uri,map(/etc/haproxy/redirects.map) -m found }
#create file "/etc/haproxy/redirects.map" with follow content
/google https://google.com
/face https://facebook.com
#access browser with http://localhost/google
Thanks