Skip to content

Instantly share code, notes, and snippets.

View brunocarvalhodearaujo's full-sized avatar

Bruno Carvalho de Araujo brunocarvalhodearaujo

  • Rede D'Or São Luiz
  • Rio de Janeiro, Brazil
  • 12:11 (UTC -03:00)
  • X @Bruno_C_Araujo
View GitHub Profile
@brunocarvalhodearaujo
brunocarvalhodearaujo / Jenkinsfile
Created July 21, 2021 16:39 — forked from mrhockeymonkey/Jenkinsfile
Jenkins pipeline running a remote ansible playbook
#!groovy
pipeline {
agent any
//These params will be displayed for user input when running a build, They are also accepted by the API
parameters {
string(name: 'BUILD_HOSTNAME', description: 'The name of the server to build (from Mdb)')
string(name: 'ILO_IP', description: 'The IP address for the server ilo')
booleanParam(name: 'skipOneView', description: 'Skip the OneView stage?', defaultValue: false)

I had a bit of trouble figuring out how to use bitnami's sealed secrets with helm

Here's a definition of done to help you see what I was trying to achieve.

Definition of done

  • Single secret available for a release in a namespace, listing all secret variables
  • Regular helm workflow, with no extra kubeseal commands for developers
  • Encrypted secrets clearly visible in git
  • Sealedsecret managed by helm
/**
* Copyright (c) 2021-present, Bruno Carvalho de Araujo.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import fetch from 'cross-fetch'
@brunocarvalhodearaujo
brunocarvalhodearaujo / playbook-criando-pasta.yml
Created February 26, 2021 13:02
Exemplos de introdução ao Ansible
- hosts: all
user: admin
tasks:
- name: Criando uma pasta na home do usuário
command: mkdir ~/exemplo
@brunocarvalhodearaujo
brunocarvalhodearaujo / README.md
Created November 9, 2020 19:00 — forked from GendelfLugansk/README.md
Wrapper for expo-sqlite with async/await, migrations and transactions

Expo-sqlite - the right way

Why

With expo-sqlite it's not possible to execute few depending statements inside single transaction - db.transaction does not work with async/promise and tx.executeSql just enqueues sql statement but does not execute it.

Documentation

Database class has two methods - execute (to execute single statement without transaction) and transaction(cb) to execute few statements inside a transaction

@brunocarvalhodearaujo
brunocarvalhodearaujo / App.js
Created September 20, 2020 17:30 — forked from darryl-davidson/App.js
Example Expo 35 App that registers Background Fetch and Location Updates
import React, { useEffect } from "react";
import { StyleSheet, Text, View } from "react-native";
import * as BackgroundFetch from "expo-background-fetch";
import * as TaskManager from "expo-task-manager";
import * as Permissions from "expo-permissions";
import * as Location from "expo-location";
import { Notifications } from "expo";
import { Button } from "react-native";
const LOCATION_FETCH_TASK = "upload-job-task-with-location";
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
@brunocarvalhodearaujo
brunocarvalhodearaujo / docker-compose.yml
Last active January 24, 2020 21:56
Mirth Connect docker-compose
version: '3.7'
services:
# https://hub.docker.com/_/postgres
postgres:
image: postgres:12-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=mirthdb
- POSTGRES_PASSWORD=mirthdb
- POSTGRES_DB=mirthdb
@brunocarvalhodearaujo
brunocarvalhodearaujo / login_test.scala
Created November 13, 2019 14:23 — forked from alanphil/login_test.scala
Gatling login example and showing how to pull out the HTTP authorization header into a variable
package test
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class LoginTest extends Simulation {

Elasticsearch Node.js client common operations

Index (insert)

client.index({
  index: 'example_index',
  type: 'posts',
 id: '1',