Skip to content

Instantly share code, notes, and snippets.

View levymoreira's full-sized avatar

Levy Moreira levymoreira

  • Microsoft
  • Dublin, Ireland
View GitHub Profile
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-set-default
sudo apt-get install -y curl
sudo apt-get install -y git
sudo apt-get install -y zip
sudo apt-get install -y libfontconfig
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-set-default
sudo apt-get install -y curl
sudo apt-get install -y git
sudo apt-get install -y zip
sudo apt-get install -y libfontconfig
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-set-default
sudo apt-get install -y curl
sudo apt-get install -y git
sudo apt-get install -y zip
sudo apt-get install -y libfontconfig
@levymoreira
levymoreira / 421332ffd
Created October 17, 2016 01:42
sdf234
package com.dluxdays.service.csv;
import com.dluxdays.service.util.OfferCSVDTO;
import com.dluxdays.service.util.OfferCSVDTOBuilder;
import com.dluxdays.web.rest.CSVResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
#!/bin/bash
# How to run this script
#
# Windows only, do it first:
# vagrant up
# vagrant ssh
# cd /vagrant
#
# Running the script:
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-set-default
sudo apt-get install -y curl
sudo apt-get install -y git
sudo apt-get install -y zip
sudo apt-get install -y libfontconfig
@levymoreira
levymoreira / configureDevMachine.sh
Last active August 29, 2015 14:27
This script configure a NodeJs dev machine
########################################################
# This script configure a NodeJs dev machine
# How run?
# 1- Save this text as configureDevMachine.sh at home directory
# 2- Change the variable notRootUser to your user name
# 3- Open terminal and execute
# sudo chmod u+x configureDevMachine.sh
# sudo ./configureDevMachine.sh
########################################################
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Postgres AMAZON EC2 -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
@levymoreira
levymoreira / gist:10462576
Created April 11, 2014 12:03
Simple php page to receive every month the use confirmation of the program
<?php
//params send by get to page
$companieId = $_GET["id"];
$companieName = $_GET["name"];
//default return
$return = "error";
//database configs
@levymoreira
levymoreira / gist:6536181
Created September 12, 2013 11:50
Open report of iReport with JSF app.
HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
FuncUtil.apagarArquivos(request);
String pathJasper = request.getRealPath("WEB-INF/classes/relatorio"); // local onde esta o relatorio
String os = System.getProperty("os.name");
File pasta = new File((os.toLowerCase().indexOf("linux") > -1 ? "/" : "\\"));
pathJasper += pasta;