Skip to content

Instantly share code, notes, and snippets.

View brunosaboia's full-sized avatar

Bruno Saboia de Albuquerque brunosaboia

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brunosaboia on github.
  • I am brunosaboia ( on keybase.
  • I have a public key ASAZILcgCfrPFZ_TT2o7axCnagVh8Qh8M94QfXfWV-lZwQo

To claim this, I am signing this object:

FROM node:14.8.0-stretch
RUN mkdir -p ${APPLICATION_DIR} && \
chown node:node ${APPLICATION_DIR}
use std::str::FromStr;
struct ParseError<'a, E> {
error: E,
source: &'a str,
fn parse<'a, T: FromStr>(s: &'a str) -> Result<T, ParseError<'a, T::Err>> {
s.parse().map_err(|e| ParseError { error: e, source: s })
Lately having escaped three-kinded death
Not by evasion but by coming through
I celebrate what may be true beginning.
But new begun am most without resource
Stupid and stopped.
How do the newborn grow? I am of them.
Freshness has taken our hearts;
Pain strips us to the source, infants of further life
Waiting for childhood as we wait for form.
brunosaboia /
Created January 5, 2018 05:53
Python script to clone all repos from a given Bitbucket team
# -*- coding: utf-8 -*-
Little script to clone all repos from a given BitBucket team/user.
:author: Bruno Saboia de Albuquerque <>
brunosaboia /
Created January 5, 2018 05:48
Bash one-liner script to clone all repos from a Bitbucket team
for repo in $(curl -u {username} --raw{team} | sed -r 's/("name": )/\n\1/g' | sed -r 's/"name": "(.*)"/\1/' | sed -e 's/{//' | cut -f1 -d\" | tr '\n' ' '); do git clone{team}/$repo.git; done
brunosaboia / function.r
Created October 1, 2015 13:38
A function to remove the RF from the Stocks
remove_risk_free <- function(stocks, risk_free, rf_col_name) {
if(class(risk_free) != class(timeSeries()) || class(stocks) != class(timeSeries())) {
stop("The two first parameters must be timeSeries objects")
if(nrow(risk_free) != nrow(stocks)) {
stop("The two time series must be from the same size")
ret <- stocks[,1]
protected override void WndProc(ref Message m)
switch (m.Msg)
case 0x84:
base.WndProc(ref m);
if ((int)m.Result == 0x1)
m.Result = (IntPtr)0x2;
brunosaboia / Post4-3.cs
Created September 13, 2013 20:55
Salvar o nome no XData
static public void SalvarNome()
var documento = Application.DocumentManager.MdiActiveDocument;
var editor = documento.Editor;
var nomeApp = "AppTesteXData";
var opcoesNome = new PromptStringOptions("\nDigite um nome para a entidade: ");
opcoesNome.AllowSpaces = true;
var resultadoNome = editor.GetString(opcoesNome);
brunosaboia / Post4-2.cs
Created September 13, 2013 20:22
Registrando a app na tabela
static void RegistrarApp(string nome)
var documento = Application.DocumentManager.MdiActiveDocument;
var banco = documento.Database;
using (var transacao = documento.TransactionManager.StartTransaction())
var tabela = transacao.GetObject(banco.RegAppTableId, OpenMode.ForRead, false) as RegAppTable;