Skip to content

Instantly share code, notes, and snippets.

View luizrobertofreitas's full-sized avatar

Luiz Roberto Freitas luizrobertofreitas

View GitHub Profile
@luizrobertofreitas
luizrobertofreitas / maven-weblogic-deployment
Last active August 29, 2015 14:03
Maven ant plugin for weblogic deployment
Using maven ant plugin for weblogic deployment. First, configure your pom.xml as below. Try the following maven command to execute the plugin goal:
mvn clean package antrun:run
Configuration:
<build>
<finalName>artifactName</finalName>
<plugins>
<?xml version="1.0" encoding="UTF-8" ?>
<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_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="order-old" transaction-type="RESOURCE_LOCAL">
<class>model.Order</class>
<class>model.OrderLine</class>
<class>model.Customer</class>
<properties>
<!-- Change this to access your own database. -->
@luizrobertofreitas
luizrobertofreitas / mysql-database-encoding
Created August 31, 2014 22:22
Alter mysql database collation and character
ALTER DATABASE app DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
@luizrobertofreitas
luizrobertofreitas / af_inputDate_hack
Created January 20, 2015 16:37
Change the default time picker in the af:inputDate popup
$(document).ready(function () {
var inputDateCurrentId = '';
$("a[id$='idEndDt\\:\\:glyph']").click(function(evt) {
inputDateCurrentId = 'idEndDt';
});
$("a[id$='idStartDt\\:\\:glyph']").click(function(evt) {
inputDateCurrentId = 'idStartDt';
@luizrobertofreitas
luizrobertofreitas / steps-mysql-ds-wildfly
Created July 27, 2015 19:24
Steps to add a MySQL Datasource on Wildfly 8.2
First: http://giordanomaestro.blogspot.com.br/2015/02/install-jdbc-driver-on-wildfly.html
Second: http://blog.squins.com/2014/12/adding-a-mysql-jndi-datasource-to-jboss-wildfly-via-cli/
@luizrobertofreitas
luizrobertofreitas / elem-os-warnings.txt
Created January 2, 2016 13:38
Alguns warnings que ocorrem ao abrir programas Gtk no elementary os
1 - Gtk-Message: Failed to load module "pantheon-filechooser-module"
2 - Gtk-Message: Failed to load module "canberra-gtk-module"
$ sudo apt-get install libcanberra-gtk-module
3 - Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
@luizrobertofreitas
luizrobertofreitas / checkpoint-snx-vpn-client-fedora25.txt
Created May 16, 2017 13:20 — forked from rafaeltuelho/checkpoint-snx-vpn-client-fedora25.txt
setup Checkpoint Firewall VPN with SNX on Linux Fedora 25
First you have to ensure the Java JRE is installed on your system.
Remember the java plugin will only work on Firefox. If you prefer to install from fedora/rhel repos:
sudo dnf (yum) install java-1.8.0-openjdk icedtea-web
download the snx script installer from the Checkpoint VPN page:
https://<your company vpn ip addr>/sslvpn/SNX/INSTALL/snx_install.sh
run int as root to install
@luizrobertofreitas
luizrobertofreitas / spring-boot-utc-timezone
Created June 5, 2017 15:06
Setting UTC timezone spring-boot
@SpringBootApplication
public class Application {
@PostConstruct
void started() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"