Skip to content

Instantly share code, notes, and snippets.

View brunosaboia's full-sized avatar

Bruno Saboia de Albuquerque brunosaboia

View GitHub Profile
@brunosaboia
brunosaboia / clooney.py
Created January 5, 2018 05:53
Python script to clone all repos from a given Bitbucket team
# -*- coding: utf-8 -*-
"""
coinify-tools
clooney
~~~~~~~~~~~~
Little script to clone all repos from a given BitBucket team/user.
:author: Bruno Saboia de Albuquerque <bsa@coinify.com>

Keybase proof

I hereby claim:

  • I am brunosaboia on github.
  • I am brunosaboia (https://keybase.io/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
ENV APPLICATION_DIR=/usr/src/app
ENV RETENTION_DAYS=7
ENV PORT=7777
ENV PATH="${APPLICATION_DIR}:${PATH}"
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
brunosaboia / clone_all_bitbucket.sh
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 https://api.bitbucket.org/1.0/users/{team} | sed -r 's/("name": )/\n\1/g' | sed -r 's/"name": "(.*)"/\1/' | sed -e 's/{//' | cut -f1 -d\" | tr '\n' ' '); do git clone git@bitbucket.org:{team}/$repo.git; done
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;
return;
}
@brunosaboia
brunosaboia / Post4-3.cs
Created September 13, 2013 20:55
Salvar o nome no XData
[CommandMethod("SalvarNome")]
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
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;
@brunosaboia
brunosaboia / Post4-1.cs
Last active December 23, 2015 00:39
Ler nome para XData
[CommandMethod("LerNome")]
public static void LerNome()
{
var documento = Application.DocumentManager.MdiActiveDocument;
var editor = documento.Editor;
var opcoes = new PromptEntityOptions("\nSelecione a entidade: ");
opcoes.SetRejectMessage("\nPor favor, selecione uma reta (Line).");
opcoes.AddAllowedClass(typeof(Line), false);
opcoes.AllowNone = false;