Skip to content

Instantly share code, notes, and snippets.

View edujr1's full-sized avatar

Eduardo Junior edujr1

View GitHub Profile
@edujr1
edujr1 / login.html
Last active September 12, 2017 20:18
Fazendo Login em outro Site via parametros
<html>
<head>
<title>Login por parametros</title>
</head>
<body>
<form action="https://iwbarecebiveis.wba.com.br/iwba/pages/index.jsf/j_security_check" method="POST" target="_blank">
Usuário : <input name="j_username" type="text" size="30">
Senha: <input name="j_password" type="password" size="30">
<input name="j_submit" type="submit" id="j_submit" value="enviar">
@edujr1
edujr1 / nomeIcone.desktop
Last active November 4, 2017 12:55
Criar Ícone Desktop Linux (~/.local/share/applications/)
[Desktop Entry]
Name=Eclipse Oxygen
Type=Application
Exec=/home/eduardojr/sdk/eclipse/eclipse
Icon=icon.xpm
Categories=Development;IDE;Java;
Keywords=Development;Java;IDE;
@edujr1
edujr1 / persistence.xml
Last active September 1, 2022 20:59
Arquivo persistence.xml (JPA) para PostgreSQL
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
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_2_0.xsd">
<persistence-unit name="NOME_QUALQUER_DO_PERSISTENCE" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/NOME_DO_BANCO" />
<property name="javax.persistence.jdbc.user" value="postgres" />
@edujr1
edujr1 / standalone.xml
Last active July 15, 2017 18:52
standalone.xml do Wildfly10 para postgreSQL
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="urn:jboss:domain:4.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan" />
<extension module="org.jboss.as.connector" />
<extension module="org.jboss.as.deployment-scanner" />
<extension module="org.jboss.as.ee" />
<extension module="org.jboss.as.ejb3" />
<extension module="org.jboss.as.jaxrs" />
<extension module="org.jboss.as.jdr" />
@edujr1
edujr1 / site-clone-script.sh
Last active July 13, 2017 04:26
Clonando um site completo com links convertidos (localhost/...)
wget --mirror -p --convert-links http://getbootstrap.com/
@edujr1
edujr1 / index.html
Last active October 19, 2021 14:43
Requisição Ajax com javascript puro (autenticação no Header)
<html>
<head>
<title>
Criando requisição Ajax utilizando Javascript puro
</title>
</head>
<body>
<div>
@edujr1
edujr1 / pom.xml
Created July 17, 2017 13:30
gerando JAR Executavel no BUILD (utilizando o POM.XML)
<build>
<finalName>Gera-jar-executavel</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>PACOTE.CLASSEMAIN</mainClass>
</configuration>
@edujr1
edujr1 / angular-materialize.js
Created July 25, 2017 04:13
Usando Materialize com Angular 1
(function (angular) {
var undefined;
angular.module("ui.materialize", ["ui.materialize.ngModel", "ui.materialize.collapsible", "ui.materialize.toast", "ui.materialize.sidenav", "ui.materialize.material_select", "ui.materialize.dropdown", "ui.materialize.inputfield", "ui.materialize.input_date", "ui.materialize.tabs", "ui.materialize.pagination", "ui.materialize.pushpin", "ui.materialize.scrollspy", "ui.materialize.parallax","ui.materialize.modal", "ui.materialize.tooltipped", "ui.materialize.slider", "ui.materialize.materialboxed", "ui.materialize.scrollFire", "ui.materialize.nouislider", "ui.materialize.input_clock", "ui.materialize.carousel"]);
/* example usage:
<div scroll-fire="func('Scrolled', 2000)" ></div>
*/
angular.module("ui.materialize.scrollFire", [])
.directive("scrollFire", ["$compile", "$timeout", function ($compile, $timeout) {
return {
@edujr1
edujr1 / index.html
Created July 25, 2017 04:19
Gerando App Mobile através do ServiceWorker
<!doctype html>
<html>
<header>
<meta charset="UTF-8">
<title>APP WEB</title>
<link rel="manifest" href="manifest.json">
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#e91e63">
<link rel="icon" sizes="192x192" href="img/angular.png">
@edujr1
edujr1 / image-to-PDF.sql
Created October 5, 2017 14:59
Converte campo "image" do SQL Server para um PDF
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO