Skip to content

Instantly share code, notes, and snippets.

View sebastianwebber's full-sized avatar
🏠
Working from home

Sebastian Webber sebastianwebber

🏠
Working from home
View GitHub Profile
#!/bin/bash
yum install python-setuptools python-psutil python-psycopg2 git gcc make postgresql93-devel -y
export PATH="/usr/pgsql-9.3/bin:$PATH"
mkdir /opt/resources
cd /opt/resources
git clone https://github.com/julmon/pg_activity.git
cd pg_activity/
python setup.py install --with-man
:set bg=dark
:set nu
:set tabstop=4
:set shiftwidth=4
:set softtabstop=4
:set expandtab
:set ic
:set nowrap
@sebastianwebber
sebastianwebber / wildfly-toolbelt.md
Last active May 11, 2016 04:46
Wildfly administration tips

#Wildfly Toolbelt

Deploy Related

Find domain deployments in filesystem

Basically, you need to open domain.xml under WILDFLY_HOME/domain/configuration and find the <deployments> session. In that session, each deployment contain a <content> tag. The attribute sha1 contains details where the file is storaged on the filesystem. EG:

<deployments>
 

Instalação do Oracle 11gR2 no OEL6

instalar vnc

yum install tigervnc-server xterm

ajustar configurações

@sebastianwebber
sebastianwebber / README.md
Last active October 7, 2015 03:08
JBoss/Wildfly server.log REGEX sheet cheat

JBoss/Wildfly server.log REGEX sheet cheat

Summary

'(WARN|ERROR)[ ]{1,}\[[\.a-z0-9A-Z]{1,}\]'

egrep sample:

egrep '(WARN|ERROR)[ ]{1,}\[[\.a-z0-9A-Z]{1,}\]' -o server.log
@sebastianwebber
sebastianwebber / README.md
Last active July 18, 2016 12:56
Laboratorio PGSQL - EL7

Setup Laboratório PostgreSQL

Esse material foi criado pra apoiar a instalação do virtual box e vagrant a fim de usar essa vm no laboratório do curso de PostgreSQL. Os comandos abaixo foram testados no Fedora 20 porém acredito que possam ser utilizados em versões posteriores.

Abra um terminal e siga os passos abaixo.

Prepação do ambiente necessário

Instalar virtualbox

Referencia: https://www.virtualbox.org/wiki/Linux_Downloads

sudo yum install http://download.virtualbox.org/virtualbox/5.0.6/VirtualBox-5.0-5.0.6_103037_fedora18-1.x86_64.rpm
@sebastianwebber
sebastianwebber / README.md
Created October 23, 2015 13:57
PostgreSQL Tools SETUP
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@sebastianwebber
sebastianwebber / zabbix-el7.md
Last active November 25, 2015 10:22
Zabbix Installation (with PostgreSQL) on EL7

Zabbix Installation (with PostgreSQL) on EL7

Install the necessary repositories

yum install http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm epel-release

Install the necessary software:

yum install zabbix-server-pgsql zabbix-agent zabbix-web-pgsql postgresql94-server httpd php
@sebastianwebber
sebastianwebber / exemplo.sh
Created November 27, 2015 12:06
exemplo de scripts para rodar em servidor remoto
#!/bin/bash
DEFAULT_USER=root
DIR_SCRIPTS=/tmp
function sync_scripts() {
ssh $DEFAULT_USER@$1 mkdir -p $DIR_SCRIPTS > /dev/null 2>&1
rsync -a --partial teste.sh $DIR_SCRIPTS
}