Skip to content

Instantly share code, notes, and snippets.

View adilsoncarvalho's full-sized avatar

Adilson Carvalho adilsoncarvalho

View GitHub Profile
@adilsoncarvalho
adilsoncarvalho / README.md
Last active August 22, 2022 12:00
Deploying a firebase function from Bitbucket pipelines

Deploying functions from Bitbucket Pipelines

It's quite easy and the same process applies to all Firebase features with minor changes.

Acquire a deployment token

In order to deploy you'll need a deployment token (I named it FIREBASE_TOKEN) and it can be acquired by using the following command

firebase login:ci

@adilsoncarvalho
adilsoncarvalho / keybase.md
Created September 20, 2017 13:36
keybase.md

Keybase proof

I hereby claim:

  • I am adilsoncarvalho on github.
  • I am adilson (https://keybase.io/adilson) on keybase.
  • I have a public key ASDJwuIJbFAMN6GIf7DwlZMoUMAwePS1OWsUGdDSaIAPzwo

To claim this, I am signing this object:

@adilsoncarvalho
adilsoncarvalho / nginx.conf
Last active August 7, 2017 02:33
letsencrypt.org: forwarding acme challenge to another server
upstream target_service {
server [TARGET SERVICE NAME/IP AND PORT];
}
server {
# ... other stuff ...
location /.well-known/acme-challenge {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@adilsoncarvalho
adilsoncarvalho / docker-compose.yml
Created August 4, 2017 16:46
Quick'n'dirty compose to run ruby & mysql
version: '3'
services:
app:
image: ruby:2.2.7
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
@adilsoncarvalho
adilsoncarvalho / bitbucket-pipelines.yml
Last active April 16, 2024 12:03
Bitbucket Pipelines deployment to a Google Container Engine configuration
options:
docker: true
pipelines:
branches:
master:
- step:
image: google/cloud-sdk:latest
name: Deploy to production
deployment: production
caches:
@adilsoncarvalho
adilsoncarvalho / Dockerfile
Created June 22, 2017 17:06
Dockerfile: multi-stage
# ---- Base Node ----
FROM ubuntu AS base
# install the core dependencies
RUN apt-get install -y my package list
# set working directory
WORKDIR /app
# copy project file
COPY Gemfile .
COPY Gemfile.lock
{
"extends": "airbnb-base"
}
@adilsoncarvalho
adilsoncarvalho / tapi_mac.js
Last active April 9, 2021 12:53
MercadoBitcoin - Calculando o TAPI-MAC em NodeJS
const TAPI_SECRET = '1ebda7d457ece1330dff1c9e04cd62c4e02d1835968ff89d2fb2339f06f73028';
const EXPECTED_TAPI_MAC = '7f59ea8749ba596d5c23fa242a531746b918e5e61c9f6c8663a699736db503980f3a507ff7e2ef1336f7888d684a06c9a460d18290e7b738a61d03e25ffdeb76';
const MESSAGE = '/tapi/v3/?tapi_method=list_orders&tapi_nonce=1';
const crypto = require('crypto');
const hmac = crypto.createHmac('sha512', TAPI_SECRET);
hmac.update(MESSAGE);
const TAPI_MAC = hmac.digest('hex');
@adilsoncarvalho
adilsoncarvalho / README.md
Last active April 6, 2017 14:36
Command line to remove DotNet Core from my Mac
curl https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh | sudo bash
@adilsoncarvalho
adilsoncarvalho / docker-compose.yml
Created March 4, 2017 22:42
This will resolve the filesystem issue between Docker and macOS for MSSQL Server
version: "2"
services:
mssql:
image: microsoft/mssql-server-linux
volumes:
- mssql-volume:/var/opt/mssql
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Test@123