Skip to content

Instantly share code, notes, and snippets.

View ryanpadilha's full-sized avatar
:octocat:

Ryan Padilha ryanpadilha

:octocat:
View GitHub Profile
@ryanpadilha
ryanpadilha / README-Template.md
Created September 5, 2017 19:54 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ryanpadilha
ryanpadilha / java-8-ami.md
Created September 18, 2017 16:51 — forked from rtfpessoa/java-8-ami.md
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
#
# First Login on PostgreSQL 9.6.4
#
# configuration files on Ubuntu - /etc/postgresql/9.6/main
# configuration files on CentOS - ##
# pg_hba.conf file - add this lines for remote connection
host all all 0.0.0.0/0 md5
host all all ::/0 md5
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
sudo -u postgres psql
- paste this code in postgres console:
CREATE DATABASE django_project;
CREATE USER username WITH PASSWORD 'pass1234';
ALTER ROLE username SET client_encoding TO 'utf8';
ALTER ROLE username SET default_transaction_isolation TO 'read committed';
@ryanpadilha
ryanpadilha / jenkins-install.sh
Last active September 12, 2021 13:21
Install Jenkins on Ubuntu or CentOS
#!/bin/bash
#
# Jenkins 2.73.2 instructions for installation on Ubuntu Linux
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
# edit the configurations
@ryanpadilha
ryanpadilha / maven-home-centos.sh
Last active November 3, 2017 19:07
$M2_HOME on CentOS 7
#!/bin/bash
#
# Maven 3.5 on CentOS 7
cd ~
wget http://mirror.nbtelecom.com.br/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar -zxvf apache-maven-3.5.2-bin.tar.gz
mv apache-maven-3.5.2 /var/<company-name>/apps/
vim /etc/profile.d/maven.sh
@ryanpadilha
ryanpadilha / jenkins-backup-thin.sh
Last active November 8, 2017 16:10
Backup Jenkins configuration
#!/bin/bash
#
# Jenkins 2.73.2 instructions for execute backup from .zip files of Thinbackup plugin
cd /opt/backup/jenkins
# global configuration for first use
git config --global user.email "[email protected]"
git config --global user.name "Ryan Padilha"
# if the remote repository is not setup
#!/bin/bash
#
# Jenkins 2.73.2 instructions for execute backup from .zip files of Thinbackup plugin
cd /opt/backup/jenkins
# global configuration for first use
git config --global user.email "[email protected]"
git config --global user.name "Ryan Padilha"
if [ -n "$(git status --porcelain)" ]; then
@ryanpadilha
ryanpadilha / postgresql-verify-object.sql
Created November 22, 2017 16:04
Useful commands for search objects on postgresql
psql -h 172.31.3.119 -U <username> -p 5492 <database>
\dt public.*
select * from pg_tables where schemaname='public';
SELECT specific_catalog, specific_schema, specific_name, routine_name
FROM information_schema.routines
WHERE routine_type='FUNCTION'
AND specific_schema='public'
AND routine_name LIKE 'gin_%';
@ryanpadilha
ryanpadilha / nomad-install.sh
Last active December 13, 2022 09:06
HashiCorp Nomad installation on Linux x64
#!/bin/bash
#
# Installation of Hashicorp Nomad for deploy process
#
# Download this file:
# curl -sSL https://gist.githubusercontent.com/ryanpadilha/351a4a4f17afdc8eb0d963897b98122a/raw/ -o nomad-install.sh
#
echo "Initializing script for devops - Nomad Hashicorp"