Skip to content

Instantly share code, notes, and snippets.

View tarsislimadev's full-sized avatar
🏠
Working from home

Tarsis Lima tarsislimadev

🏠
Working from home
View GitHub Profile
@tarsislimadev
tarsislimadev / sample.xml
Created September 1, 2025 18:17
Example of GraphML
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key id="name" for="node" attr.name="name" attr.type="string"/>
<key id="id" for="node" attr.name="id" attr.type="long"/>
<key id="labels" for="node" attr.name="labels" attr.type="string"/>
<key id="label" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
<node id="1" labels=":Person">
@tarsislimadev
tarsislimadev / binance-auto-flow.md
Created August 26, 2025 22:33
Binance Auto Flow

Binance Auto Flow

flowchart LR
    A("Begin") --> B["Get Ticker Price"]
    B --> C["Save Ticker Price in History"]
    C --> D{"Is Ticker Price the Lowest in History?"}
    D -- No --> B
    D -- Yes --> E["Calc Fees to Buy"]
 E --&gt; F{"With Fees, is Buy Ticker Price good?"}
@tarsislimadev
tarsislimadev / iframes.js
Last active August 18, 2025 18:42
Reload iframes
Array.from(document.getElementsByTagName('iframe')).map(i => i.src = i.src.replace('/ia20251.', '/iaead.'))
@tarsislimadev
tarsislimadev / listen.to.screen.js
Last active September 1, 2025 13:49
Listen to the screen
// Wait an audio finish to start playing others
const a = document.createElement('div')
a.style.zIndex = '999999'
a.style.position = 'fixed'
a.style.color = '#000000'
a.style.backgroundColor = '#ff9900'
a.style.bottom = '0px'
a.style.right = '0px'
a.style.width = '300px'
@tarsislimadev
tarsislimadev / Dockerfile
Created July 14, 2025 00:23
[docker][openjdk][java][android][nvm][node][npm] cordova create app
FROM openjdk:8-jdk
RUN apt update -y
RUN apt install -y android-sdk
RUN curl "https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh" | bash -
RUN \. "$HOME/.nvm/nvm.sh"
# Retorna dados sobre o pregão
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDados.asp?CodDado=IBOV,ticker&CA=undefined
# Retorna ações e seus últimos valores negociados
http://www.bmfbovespa.com.br/Pregao-OnLine/ExecutaAcaoCarregarDados.asp?CodDado=Ticker
# Retorna o histórico do dia de um papel
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDadosPapeis.asp?CodDado=petr4
# Retorna dados de um papel
@tarsislimadev
tarsislimadev / stocks.md
Last active June 23, 2025 12:22
Stocks

Stocks

eodhd

Endpoints

Get Real-time prices for US Stocks (websocket)

URL: wss://ws.eodhistoricaldata.com/ws/us?api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX

@tarsislimadev
tarsislimadev / read.json.file.js
Created June 10, 2025 19:28
Read a JSON file
const fs = require('fs')
const path = require('path')
const file = fs.readFileSync(process.argv[2])
const json = JSON.parse(file)
console.log({ json })
@tarsislimadev
tarsislimadev / nginx.conf
Created June 2, 2025 13:34
Virtual Hosts on nginx
http {
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:3000; # Forward requests to another server
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@import "tailwindcss";