Skip to content

Instantly share code, notes, and snippets.

View vagnernogueira's full-sized avatar

Vagner Nogueira vagnernogueira

View GitHub Profile
@vagnernogueira
vagnernogueira / .bashrc
Last active February 6, 2020 05:45
Aliases in .bashrc on CentOS7
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@vagnernogueira
vagnernogueira / bogonsblocks.sh
Last active May 25, 2022 13:08
Firewall-D and IPSETs
#!/bin/bash
# geoip on firewall in centos 7
# this file: /etc/cron.weekly/bogonsblocks.sh
# sudo chmod +x /etc/cron.weekly/bogonsblocks.sh
## create tmp dir
# sudo mkdir /var/tmp/ipbogons
## create list on ipset
# sudo ipset create bogonslist hash:net maxelem 1000000
## create rule on firewall-cmd
package jtest;
// EnumerateScriptEngines.java
import java.util.*;
import javax.script.*;
public class EnumerateScriptEngines {
public static void main(String[] args) {
ScriptEngineManager manager = new ScriptEngineManager();
@vagnernogueira
vagnernogueira / AppData-Roaming-Code-User-settings.json
Last active November 1, 2019 13:45
VC Code - Minhas configurações
{
"editor.suggestSelection": "first",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.renderWhitespace": "all",
"editor.wordWrap": "on",
"editor.wordWrapColumn": 120,
"editor.minimap.enabled": true,
"extensions.ignoreRecommendations": true,
"extensions.showRecommendationsOnlyOnDemand": true,
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JDK_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export MAVEN_HOME=/opt/apache-maven
export M2=${MAVEN_HOME}/bin
export M2_HOME=${MAVEN_HOME}
export PATH=${MAVEN_HOME}/bin:${PATH}
export JBOSS_HOME=/opt/jboss-eap-7
export MAVEN_OPTS=-Xms256m -Xmx512m
---
# Instalação do docker em distro Ubuntu no WSL 2
# Use
# sudo ansible-playbook install-docker.yml
# Referências
# (1) https://github.com/codeedu/wsl2-docker-quickstart#docker-engine-docker-nativo-diretamente-instalado-no-wsl2
# (2) https://cloudinfrastructureservices.co.uk/how-to-install-docker-compose-using-ansible-playbook/
- hosts: localhost
#become: true
#become_user: root
@vagnernogueira
vagnernogueira / centos-7-package.sh
Last active October 1, 2022 23:01 — forked from clivewalkden/centos-7-package.sh
How to add VirtualBox Guest Additions for vagrant into minimal install of Cent OS 7.
# Start the old vagrant
$ vagrant init centos-7
$ vagrant up
# You should see a message like:
# Installing Virtualbox Guest Additions 5.0.20 - guest version is unknown
$ vagrant ssh
# corrigir erro de yum
@vagnernogueira
vagnernogueira / script.sh
Last active February 28, 2023 17:28
Adicionar Driver Oracle no jboss domain após copiar a pasta modules/detran para os servidores
Adicionar Driver Oracle no jboss domain após copiar a pasta modules/detran para os servidores
/opt/rh/eap7/root/usr/share/wildfly/bin/jboss-cli.sh --connect
/profile=Prf-Renavam/subsystem=datasources/jdbc-driver=oracle:add(driver-name="oracle",driver-module-name="detran.oracle8",driver-class-name=oracle.jdbc.OracleDriver,xa-datasource-class=oracle.jdbc.xa.OracleXADataSource)
/profile=Prf-Renach/subsystem=datasources/jdbc-driver=oracle:add(driver-name="oracle",driver-module-name="detran.oracle8",driver-class-name=oracle.jdbc.OracleDriver,xa-datasource-class=oracle.jdbc.xa.OracleXADataSource)
/profile=Prf-Externo/subsystem=datasources/jdbc-driver=oracle:add(driver-name="oracle",driver-module-name="detran.oracle8",driver-class-name=oracle.jdbc.OracleDriver,xa-datasource-class=oracle.jdbc.xa.OracleXADataSource)
@vagnernogueira
vagnernogueira / dba_snapshot_database.sql
Created June 8, 2023 19:47
Script para relatório completo de uma base Oracle
-- +----------------------------------------------------------------------------+
-- | Jeffrey M. Hunter |
-- | [email protected] |
-- | www.idevelopment.info |
-- |----------------------------------------------------------------------------|
-- | Copyright (c) 1998-2008 Jeffrey M. Hunter. All rights reserved. |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : dba_snapshot_database_10g.sql |
-- | CLASS : Database Administration |