Skip to content

Instantly share code, notes, and snippets.

View wpivotto's full-sized avatar

William Pivotto wpivotto

View GitHub Profile
@wpivotto
wpivotto / Highcharts Cheat Sheet
Created February 7, 2018 16:41 — forked from mulhoon/Highcharts Cheat Sheet
Highcharts Cheat Sheet
$('#container').highcharts({
chart: {
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here.
backgroundColor: '#FFF', // The background color or gradient for the outer chart area.
borderColor: '#4572A7', // The color of the outer chart border.
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5.
borderWidth: 0, // The pixel width of the outer chart border.
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
defaultSeriesType: 'line', // Alias of type.
@wpivotto
wpivotto / gist:e8702b9069ac5bca94ff
Last active March 24, 2016 00:03
Encerrar processo no windows
netstat -a -n -o
taskkill /F /PID <PID>
@wpivotto
wpivotto / ExcelReading.java
Created October 27, 2015 17:01 — forked from Munawwar/ExcelReading.java
Java - Apache POI - Convert XLS/XLSX to CSV
/*
* Dependencies: Apache POI Library from http://poi.apache.org/
*/
package poi_excels;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
@wpivotto
wpivotto / FileSystemReportExporter.java
Created October 15, 2014 19:48
FileSystemReportExporter
package br.com.prixma.models;
import java.io.File;
import java.io.IOException;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import org.slf4j.Logger;
@wpivotto
wpivotto / gist:8732101
Created January 31, 2014 13:29
log4j.properties
log4j.rootLogger=DEBUG, stdout, file
#log4j.logger.org.hibernate.SQL=trace
#log4j.logger.org.hibernate.engine.query=trace
#log4j.logger.org.hibernate.type=trace
#log4j.logger.org.hibernate.jdbc=trace
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{dd/MM/yy HH:mm:ss.SSS} [%p] %c - %m%n
@wpivotto
wpivotto / gist:3993502
Created November 1, 2012 13:02
Maximize VMWare images performance
Insert the following code into the *.VMX file:
sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"
priority.grabbed = "high"
priority.ungrabbed = "normal"
@wpivotto
wpivotto / DefaultLoader.java
Created January 31, 2012 11:53
Vraptor - Loader dinamico
package app.infra;
import java.io.Serializable;
import org.hibernate.Session;
import br.com.caelum.vraptor.ioc.Component;
@Component
public class DefaultLoader implements Loader<Object> {
@wpivotto
wpivotto / MailController.java
Created October 28, 2011 13:18
Send a report via Email
import static br.com.caelum.vraptor.jasperreports.formats.ExportFormats.docx;
import static br.com.caelum.vraptor.jasperreports.formats.ExportFormats.pdf;
import static br.com.caelum.vraptor.jasperreports.formats.ExportFormats.xls;
import app.mailer.ReportEmail;
import app.mailer.ReportMailer;
import app.reports.ClientsReport;
import app.repositories.ClientRepository;
import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
@wpivotto
wpivotto / PreventExternalAccess.java
Created October 25, 2011 14:50
Tasks (Quartz Jobs) and Request Scope
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface PreventExternalAccess {
}