Skip to content

Instantly share code, notes, and snippets.

@anumber8
anumber8 / setup.sh
Created Jul 17, 2018 — forked from jkatz/setup.sh
Install PostgreSQL 10 & pgAdmin 4 with Docker
View setup.sh
#!/bin/bash
mkdir postgres
cd postgres
docker volume create --driver local --name=pgvolume
docker volume create --driver local --name=pga4volume
docker network create --driver bridge pgnetwork
@anumber8
anumber8 / persistence.xml
Created Mar 30, 2019 — forked from mortezaadi/persistence.xml
persistence xml configurations for major databases and jpa providers
View persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
View wildfly-datasource-and-xa-datasource.sh
# ADICIONANDO MODULOS
# MySQL
./jboss-cli.sh -c --command='module add --name=com.mysql --resources=mysql-connector-java.jar --dependencies=javax.api\,javax.transaction.api';
# ORACLE
./jboss-cli.sh -c --command='module add --name=com.oracle.ojdbc --resources=ojdbc-7.jar --dependencies=javax.api\,javax.transaction.api'
# ADICIONANDO DRIVERS
# MySQL
@anumber8
anumber8 / keycloak-defaults
Created Aug 16, 2019 — forked from markusleh/keycloak-defaults
Keycloak service script and default file for init.d
View keycloak-defaults
# General configuration for the init.d scripts,
# not necessarily for JBoss AS itself.
# default location: /etc/default/keycloak
## Location of JDK
# JAVA_HOME="/usr/lib/jvm/default-java"
## Location of WildFly
# JBOSS_HOME="/opt/keycloak"
@anumber8
anumber8 / gen_cert.sh
Created Aug 29, 2019 — forked from adamrunner/gen_cert.sh
bash script to generate a self signed certificate for development use
View gen_cert.sh
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
@anumber8
anumber8 / .babelrc
Created Nov 10, 2019 — forked from federicofazzeri/.babelrc
Node Express-based REST API (CRUD) using Firebase cloud Functions and FireStore cloud database + Babel config (The current Node version running in Cloud Functions is 6.10)
View .babelrc
{
"presets": [
["env", {
"targets": {
"node": "6.10"
}
}]
]
}
@anumber8
anumber8 / .babelrc
Created Nov 10, 2019 — forked from federicofazzeri/.babelrc
Node Express-based REST API (CRUD) using Firebase cloud Functions and FireStore cloud database + Babel config (The current Node version running in Cloud Functions is 6.10)
View .babelrc
{
"presets": [
["env", {
"targets": {
"node": "6.10"
}
}]
]
}
@anumber8
anumber8 / localhost-ssl.sh
Created Feb 8, 2020 — forked from jonsamp/localhost-ssl.sh
Create https key and cert on localhost
View localhost-ssl.sh
cd ~/
mkdir .localhost-ssl
sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048
sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/.localhost-ssl/localhost.crt
npm install -g http-server
echo "
function https-server() {
@anumber8
anumber8 / script.sh
Created May 19, 2020 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore pg_dump with password on command line #sql
View script.sh
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@anumber8
anumber8 / wildfly-9.0.2.Final-standalone-full-ha.cli
Created Aug 19, 2020 — forked from cheinema/wildfly-9.0.2.Final-standalone-full-ha.cli
WildFly CLI scripts to build the default configurations
View wildfly-9.0.2.Final-standalone-full-ha.cli
embed-server --server-config=custom-full-ha.xml --empty-config --remove-existing
# Extensions first
batch
/extension=org.jboss.as.clustering.infinispan:add
/extension=org.jboss.as.clustering.jgroups:add
/extension=org.jboss.as.connector:add
/extension=org.jboss.as.deployment-scanner:add
/extension=org.jboss.as.ee:add
/extension=org.jboss.as.ejb3:add
/extension=org.jboss.as.jaxrs:add