Skip to content

Instantly share code, notes, and snippets.

View luiswolff's full-sized avatar

Luis-Manuel Wolff Heredia luiswolff

View GitHub Profile
@luiswolff
luiswolff / Base64-Encode.cmd
Last active April 9, 2021 13:12
A CMD-File, thats convert a given File to a Base64-Code and write that to an other file. The File that should be encoded is submitted as command line parameter. So you can use the drap and drop function of Windows. The output file will be the same as the input but with the string ".base64" as suffix.
@echo off
powershell -command "$bytes = [System.IO.File]::ReadAllBytes('%1'); [Convert]::ToBase64String($bytes) | Out-File -FilePath '%1.base64' -Encoding ASCII -NoNewline"
@luiswolff
luiswolff / index.html
Created May 22, 2018 19:51
Create an icon with HTML and CSS
<html>
<head>
<title>Test CSS</title>
<link rel="stylesheet" href="style.css" >
</head>
<body>
<p>Test<span class="icon">!</span>
</body>
</html>
@luiswolff
luiswolff / AbstractHtmlServletMessageBodyWriter.java
Last active April 26, 2017 18:05
An action based MVC approach with Java EE 7 using JAX-RS and the Servlet/JSP-API.
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@luiswolff
luiswolff / CallEuropeanHOSWithSQLMapping.java
Last active April 9, 2017 16:04
Using JPA an Construtor-Result to call a stored procedure and map the result to an intern domain model
package de.luiswolff.test;
import javax.persistence.*;
import java.util.List;
/**
* This program uses the MySQL sample database "world" and a stored procedure from the MySQL-Tutorial
* <a href="https://dev.mysql.com/doc/connector-net/en/connector-net-tutorials-stored-procedures.html">
* Connector/Net 4.1.5 Working with Stored Procedures</a>.
*/
@luiswolff
luiswolff / CallEuropeanHOS.java
Last active April 9, 2017 15:58
Using JPA to call a stored procedure and map the result to an intern domain model.
package de.luiswolff.test;
import javax.persistence.*;
import java.util.List;
/**
* This program uses the MySQL sample database "world" and a stored procedure from the MySQL-Tutorial
* <a href="https://dev.mysql.com/doc/connector-net/en/connector-net-tutorials-stored-procedures.html">
* Connector/Net 4.1.5 Working with Stored Procedures</a>.
*/