Skip to content

Instantly share code, notes, and snippets.

View roneygomes's full-sized avatar
✌️

Roney Gomes roneygomes

✌️
View GitHub Profile
@roneygomes
roneygomes / git-tutorial.md
Last active October 2, 2015 02:01
Git Tutorial

Configurações Gerais

  • Criando um repositório:

  • git init

  • Clonando um repositório:

  • git clone ssh://git@nlpmobile:33000/travelg.git

  • Configurando nome do usuário:

  • git config --global user.name "Roney Gomes"

@roneygomes
roneygomes / NegativeBinary.cs
Last active October 7, 2015 12:48
Convert a number from base ten to base minus two using two different approaches.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace NegativeBinary
{
internal class Solution
{
public static void Main(string[] args)
@roneygomes
roneygomes / baixar-certidao.sh
Last active July 30, 2017 23:31
Baixar Certidão Negativa de Débito
#!/bin/sh
# Como usar: ./baixar-certidao.sh <seu-cpf-aqui>
export LC_ALL=C
URL_BASE=http://www.receita.fazenda.gov.br/Aplicacoes/ATSPO/Certidao/CNDConjuntaSegVia
CERTIDAO=ResultadoSegVia.asp\?Origem\=1\&Tipo\=2\&NI\=${1}
CERTIDAO_N_ENCONTRADA=SegundaViaCNDConjuntaMsg.asp\?Tipo\=2\&NI\=${1}

Keybase proof

I hereby claim:

  • I am roneygomes on github.
  • I am roneygomes (https://keybase.io/roneygomes) on keybase.
  • I have a public key ASCD8I1Amlfi6vLSsZafJOt01YEmLzjgB09AJD78TBOwCgo

To claim this, I am signing this object:

@roneygomes
roneygomes / date-str-to-long.clj
Last active June 14, 2019 13:47
Convert ISO date string to milliseconds since epoch.
(defn date-str->millis [date-str]
(let [milliseconds-in-a-day (* 24 60 60 1000)]
(-> (LocalDate/parse date-str DateTimeFormatter/ISO_DATE)
(.toEpochDay)
(* milliseconds-in-a-day))))
;; Examples:
;; (date-str->millis "2014-12-01")
;; => 1417392000000
;; (date-str->millis "2020-08-15")
@roneygomes
roneygomes / tap.clj
Created June 14, 2019 17:15
A very simple tap function for debugging.
(comment
(require '[puget.printer])
(defn tap [thing]
(puget.printer/cprint thing)
thing)
(main/tap (assoc {:price 1} :symbol "AAPL")))
@roneygomes
roneygomes / abev-eps.json
Created July 26, 2019 01:47
ABEV3.SA EPS
{
"2020-02-26": {
"date": "2020-02-26",
"reportDate": "2020-02-26",
"epsActual": null,
"epsEstimate": null,
"epsDifference": null,
"surprisePercent": null
},
"2019-07-25": {
{
"Trend": {
"2019-12-31": {
"date": "2019-12-31",
"period": "+1y",
"growth": "0.1030",
"earningsEstimateAvg": "0.0000",
"earningsEstimateLow": "0.0000",
"earningsEstimateHigh": "0.0000",
"earningsEstimateYearAgoEps": "0.7800",
{
"General": {
"Code": "ABEV3",
"Type": "Common Stock",
"Name": "Ambev S.A",
"Exchange": "SA",
"CurrencyCode": "BRL",
"CurrencyName": "Brazilian real",
"CurrencySymbol": "R$",
"CountryName": "Brazil",
@roneygomes
roneygomes / rust-polimorfismo-2.rs
Last active November 27, 2021 02:24
temos que colocar alguma coisa no lugar de ???
fn write(media: &mut ???, text: &str);
// ...