Skip to content

Instantly share code, notes, and snippets.

View java-env.sh
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
View AppData-Roaming-Code-User-settings.json
{
"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,
View EnumerateScriptEngines.java
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 / bogonsblocks.sh
Last active Oct 15, 2019
Firewall-D and IPSETs
View bogonsblocks.sh
#!/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
@vagnernogueira
vagnernogueira / .bashrc
Last active Feb 6, 2020
Aliases in .bashrc on CentOS7
View .bashrc
# .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=