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
  • 19:44 (UTC -03:00)
  • X @Bruno_C_Araujo
View GitHub Profile
@brunocarvalhodearaujo
brunocarvalhodearaujo / docker-compose-coreos.sh
Created April 1, 2018 15:16 — forked from sourcec0de/docker-compose-coreos.sh
Install docker compose on coreos
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.20.1/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@brunocarvalhodearaujo
brunocarvalhodearaujo / .gitlab-ci.yml
Created April 1, 2018 15:31 — forked from htuscher/.gitlab-ci.yml
Deploying with docker-compose via SSH tunnel in Gitlab CI
deploy:live:
image: 1drop/docker:git
stage: deploy
when: manual
environment:
name: production
url: https://www.somecustomer.de
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
@brunocarvalhodearaujo
brunocarvalhodearaujo / index.js
Created May 7, 2018 16:49
preview pdf react native app
import React, { Component } from 'react';
import { View, StyleSheet, WebView } from 'react-native';
import { Constants } from 'expo';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<WebView
bounces={false}
@brunocarvalhodearaujo
brunocarvalhodearaujo / pi.sh
Created October 13, 2018 22:18 — forked from jamesmoriarty/pi.sh
Raspberry Pi - hfs+, external disk, samba, minidlna, transmission
sudo raspi-config
sudo reboot
# mount external disk
sudo apt-get install hfsplus hfsutils hfsprogs
sudo mkdir /media/usb0
sudo nano /etc/fstab
# /dev/sda2 /media/usb0 hfsplus defaults,force,gid=pi,uid=pi,noatime 0 0
sudo chown -R root:users /media/usb0/
sudo chmod -R ug=rwx,o=rx /media/usb0/
const copyTextareaBtn = document.querySelector('.btn-cp')
// quando o botão for clicado aciona o evento
copyTextareaBtn.addEventListener('click', event => {
// elemento como um input com o conteudo que deve ser copiado
const copyTextarea = document.querySelector('.copytextarea')
// seleciona o elemento
copyTextarea.select();
try {
@brunocarvalhodearaujo
brunocarvalhodearaujo / Container.js
Created December 18, 2018 13:39
react styled component with flow typing
/**
* Copyright 2018-present Bruno Carvalho de Araujo.
* This source code is licensed under the proprietary license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ComponentType, ReactNode } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
/**
* @typedef {(input: RequestInfo, init: RequestInit) => Promise<Response>} Request
* @typedef {{ method: string, path: string, handler: Request, description?: string }} FakeRequest
*/
/**
* @type {FakeRequest[]}
*/
export const REQUESTS = [
{
@brunocarvalhodearaujo
brunocarvalhodearaujo / add-desktop-icon.sh
Last active September 24, 2021 14:44 — forked from susanhoffs/add-desktop-icon.sh
Install Postman on CentOS 7
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
EOL
https://www.getpostman.com/
First part from https://blog.bluematador.com/posts/postman-how-to-install-on-ubuntu-1604/
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman
But when launching postman from command prompt got an error:
@brunocarvalhodearaujo
brunocarvalhodearaujo / docker-compose.yml
Created July 29, 2019 15:08 — forked from shavo007/docker-compose.yml
Docker compose (mysql, elasticsearch, kibana) with healthchecks
version: '2.1'
services:
mysql:
container_name: mysql
image: mysql:5.7
ports:
- "13306:3306"
environment:
- MYSQL_ROOT_PASSWORD=Welcome123
healthcheck: