Skip to content

Instantly share code, notes, and snippets.

View luizrobertofreitas's full-sized avatar

Luiz Roberto Freitas luizrobertofreitas

View GitHub Profile
@luizrobertofreitas
luizrobertofreitas / primefaces-loading-dialog
Created December 3, 2013 11:10
Primefaces customized loading dialog
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" showHeader="false" style="background: white;"
draggable="false" closable="false" resizable="false">
<div align="center">
<h:outputText value="#{mensagens['resultadoBuscaProdutoSES.carregando']}" /><br/><br/>
<p:graphicImage value="/resources/images/ajax-loader.gif" />
</div>
</p:dialog>
*{
margin: 0;
padding: 0;
list-style: none;
vertical-align: baseline;
font-family: 'Arial';
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.example;
import java.util.Random;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
@luizrobertofreitas
luizrobertofreitas / gist:5472888
Created April 27, 2013 12:09
Postgresql interesting commands (for CLI only ;-) )
1 - Logging as postgress
$ sudo su - postgres
2 - Creating a new user
$ createuser user
3 - Changing/Setting user password
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.projectboard</groupId>
<artifactId>projectboard</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Project Board</name>
<description>Project management dashboard.</description>
@luizrobertofreitas
luizrobertofreitas / gist:5196392
Created March 19, 2013 14:09
JavaScript: Beautiful modal confirmation for RoR
/* Overriding custom rails on delete action to provide a more beautiful modal confirmation */
this.extendOnDeleteRailsAction = function() {
$.rails.allowAction = function(element) {
var $link, $modal_html, message, modal_html;
message = element.data('confirm');
if (!message) {
return true;
}