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 / 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
@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-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
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';
#
# 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
@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
@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 / license-badges.md
Created August 30, 2017 17:00 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
@ryanpadilha
ryanpadilha / move-remote-git-repository.sh
Created August 15, 2017 01:47
Moving a remote git repository
$ git remote show origin
$ git remote rm origin
$ git remote add origin git@newserver:project.git
$ git remote show origin
@ryanpadilha
ryanpadilha / tomcat.service
Created August 8, 2017 18:40
Sample /etc/systemd/system/tomcat.service
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid