Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
Estudando Salesforce e seu ecosistema

Carlos Delfino carlosdelfino

💭
Estudando Salesforce e seu ecosistema
View GitHub Profile
Starting SFDX: Preview Component Locally
16:53:11.704 sfdx force:lightning:lwc:preview -p Android -t Nexus_5X_API_30 -n c/selector -a browser -d /home/carlosdelfino/workspace/salesforce/bikeCard --loglevel warn
(node:18895) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use `node --trace-warnings ...` to show where the warning was created)
❯ Requirements
❯ Checking SDK root location
❯ Checking Android SDK Prerequisites
❯ Checking Android Command Line Tools
❯ Checking SDK Platform Tools
from django.conf import settings
from django.db import models
from datetime import datetime
#from carteira.models.corretora import Corretora
class AgentesCorretoras(models.Model):
corretora = models.ForeignKey('carteira.Corretora', on_delete=models.CASCADE)
agente = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
data_contratacao = models.DateField('Data de contratação do Agente',
@carlosdelfino
carlosdelfino / COTAHIST_D12122022.TXT
Last active January 28, 2023 21:56
Arquivos para uso no curso de python
This file has been truncated, but you can view the full file.
00COTAHIST.2022BOVESPA 20221212
012022121234MMMC34 0103M DRN R$ 000000001654500000000168960000000016545000000001664600000000167160000000016622000000001689600026000000000000000369000000000006142714000000000000009999123100000010000000000000BRMMMCBDR000143
012022121202RRRP3 0103R PETROLEUMON NM R$ 000000000326700000000033520000000003212000000000328000000000033330000000003331000000000333413048000000000003392100000000011129194700000000000000009999123100000010000000000000BRRRRPACNOR5100
012022121296RRRP3F 0203R PETROLEUMON NM R$ 000000000327700000000033680000000003214000000000327300000000033670000000003336000000000336700994000000000000015232000000000049863149000000000000009999123100000010000000000000BRRRRPACNOR5100
012022121202TTEN3 0103TENTOS O
@carlosdelfino
carlosdelfino / create_database.md
Last active December 13, 2022 02:13
Carregando dados dos arquivos de histórico da B3 para banco de dados SQLite, execute primeiro os comandos do arquivo create_database.txt para criar o banco de dados e seus índices.

Use os comandos abaixo com o SQLite3 para criar o banco de dados.

sqlite3 cotacoes/database.db 'create table COTACOES (
                    DATA_PREGAO date not null,
                    CODBDI text,
                    CODIGO_NEGOCIACAO text not null,
                    TIPO_MERCADO integer,
                    NOME_RESUMIDO text,
                    ESPECI text,
                    PRAZO_TERMO integer,
@carlosdelfino
carlosdelfino / primeiro_dia_util.py
Last active October 31, 2022 15:20
Obtém o primeiro e último dia útil de cada mês.
resmin = []
for month in range(1, 13):
calmin = calendar.monthcalendar(year, month)
for i, w in enumerate(calmin):
for j, d in enumerate(w):
if 0 == d:
calmin[i][j] = 32
day = min([week[0:5] for week in calmin][0])
if day == 32:
day = min([week[0:5] for week in calmin][1])
@carlosdelfino
carlosdelfino / baixar_historico_b3.py
Created October 29, 2022 18:13
Códigos para uso nos dados históricos da B3
import os
from pathlib import Path
import requests as req
def get_cotacoes(ano, mes=None, dia=None, overwrite=True):
if dia and mes:
zip_file_name = "COTAHIST_D{:02d}{:02d}{}.ZIP".format(dia,mes,ano);
elif mes:
zip_file_name = "COTAHIST_M{:02d}{}.ZIP".format(mes,dia);
@carlosdelfino
carlosdelfino / README.md
Created September 19, 2022 16:49 — forked from m93a/README.md
Example of a markdown-it extension written in TypeScript

Mark Plugin for markdown-it

This is a sample implementation of a basic extension. It uses the @types/markdown-it package from NPM which contains the documentation for markdown-it. The code here is mostly copied from the backtick rule implementation you can find in the original markdown-it repository.

Keywords

Plugin example for markdown-it, extension tutorial, markdown-it extension API, TypeScript, jsDoc, documentation for extensions, specification of plugin API, how to write an extension for markdown-it.

@carlosdelfino
carlosdelfino / README.md
Created April 3, 2022 13:42 — forked from practicalli-johnny/website.css
Example `styles/website.css` styles that over-ride Gitbook's own styles, specifically for code blocks and image alingment (centred).

Um exemplo de css para usar no GitBook

Note: We do not recommend using SSH to access a UniFi OS Console.
If you must use SSH to access a UniFi OS Console, you will need to enable SSH first:
Go to unifi.ui.com or enter the console’s IP address into your web browser.
Navigate to the UniFi OS System Settings > Advanced menu.
Enable the SSH toggle and enter an SSH password directly below.
To SSH into your device, run the following command in your terminal of choice (PowerShell or PuTTY on Windows, Terminal on Linux/mac):
ssh root@<ip-address>
/*
* Verilog Simulator checker by predefined macro.
*
* Copyright (C) 2017 MURAMATSU Atsushi <amura@tomato.sakura.ne.jp>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,