Skip to content

Instantly share code, notes, and snippets.

View brunodb3's full-sized avatar
💻
Doing stuff

Bruno brunodb3

💻
Doing stuff
View GitHub Profile
@brunodb3
brunodb3 / brasil_regions.json
Last active December 1, 2017 20:39
This file contains Brazil's regions, based on OLX website
[
{
"name": "Acre",
"initials": "AC",
"regions": [
"Acre"
]
},
{
"name": "Alagoas",
@brunodb3
brunodb3 / install_dependencies.sh
Last active December 1, 2017 20:34
This file installs all my developer dependencies
#!/bin/bash
# This file installs all my developer dependencies, such as Android SDK and MongoDB
#
# ***********************************
# Only for Ubuntu based Linux Distros
# ***********************************
#
# PPA packages and Python Software Properties
sudo apt-get install software-properties-common python-software-properties -y
# OpenJDK repo information
@brunodb3
brunodb3 / install_dependencies_lite.sh
Last active June 14, 2017 16:06
This file installs the lite version of my developer dependencies (intended to run at AWS servers)
#!/bin/bash
# This file installs the lite version of my developer dependencies (intended to run at AWS servers)
#
# ***********************************
# Only for Ubuntu based Linux Distros
# ***********************************
#
# PPA packages and Python Software Properties
sudo apt-get install software-properties-common python-software-properties -y
# MongoDB repo information
@brunodb3
brunodb3 / maintenance_template.html
Created May 2, 2017 13:17
Site Maintenance Template
<!doctype html>
<title>Site Maintenance</title>
<style>
body {
text-align: center;
padding: 150px;
}
h1 {
font-size: 50px;
@brunodb3
brunodb3 / online_notepad
Created July 5, 2017 18:52
This is a HTML code that you can paste in the URL field of a modern browser, to open an online notepad
data:text/html;charset=utf-8,
<title>Online Notepad</title>
<style>
html{ height: 100%; }
body{ background: -webkit-linear-gradient(#f0f0f0, #fff); padding: 1%; height: 94%; }
.center { margin: auto; width: 50%; padding: 10px; }
img.center { display: block; margin: 0 auto; }
.logo { width: 150px; }
.paper { font: normal 12px/1.5 "Lucida Grande", arial, sans-serif; width: 50%; height: 80%; margin: 0 auto; padding: 6px 5px 4px 42px; position: relative; color: #444; line-height: 20px; border: 1px solid #d2d2d2; background: #fff; background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px; background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; -webkit-background-size: 100% 20px; -moz-back
@brunodb3
brunodb3 / send_email.py
Last active August 16, 2018 05:02
This file is used to send an email, passing the message and subject as arguments
# -*- coding: utf-8 -*-
# this file is used to send an email, passing the message and subject as arguments
#
# to run the file:
# pyhon send-email.py "this is the subject" "this is the message"
#
# * be sure to properly config your email and password at the login function
# * this file was configured mainly for Google emails, not tested on other providers
# * for Google emails, you have to enable access for less secure apps on your account
@brunodb3
brunodb3 / config.zshrc
Created August 31, 2018 00:56
My custom .zshrc config file
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/bruno/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="powerlevel9k/powerlevel9k"
@brunodb3
brunodb3 / dazn_challenge_question_12.js
Created February 19, 2019 00:02
DAZN Challenge Question 12
function widestGap(n, start, finish) {
// Write your code here
let gaps = []
let positionsWithCars = []
let positionsWithoutCars = []
const getCarPositions = (start, end, step) => {
// returns all the positions a car occupies
// there's a bug when a car occupies positions such as [2,2], this is solved with a temporary solution:
// if (carPositions[1] == undefined) carPositions[1] = car.finish;
@brunodb3
brunodb3 / example.travis.yml
Last active June 23, 2021 10:02
Example travis.yml
language: node_js
node_js:
- "12.14"
before_deploy: "npm run build"
jobs:
include:
- stage: Test
script:
@brunodb3
brunodb3 / travis.github.md
Last active June 21, 2021 11:28
Set up GitHub deploy keys for Travis

Set up GitHub deploy keys for Travis

Based on qoomon's Gist.


See the Travis documentation for more information.

These commands should be run on the root of your project/repository.