Skip to content

Instantly share code, notes, and snippets.

View lbehnke's full-sized avatar

Lars Behnke lbehnke

  • Bruker Daltonik GmbH
  • Bremen
View GitHub Profile
@Hritik14
Hritik14 / 01-decrypt.js
Last active May 3, 2024 07:21
Encrypt aes 256 gcm in Java Springboot and decrypt in Nodejs
const {
pbkdf2Sync,
createDecipheriv,
} = require('crypto');
const algorithm = 'aes-256-gcm';
const password = 'ABCD';
const salt_hex = "FFFFFFFFFFFFFFFF"
const java_encrypted_base64 = "r8URnR8DLWFH1ipBoREtkwX6wi5x/japz85d+3e2BBWCrVs="
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active September 18, 2025 06:58
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@merikan
merikan / Jenkinsfile
Last active October 20, 2025 06:37
Some Jenkinsfile examples
Some Jenkinsfile examples
@rafaeltuelho
rafaeltuelho / jpa2-criteria-api-sample.md
Last active March 7, 2024 14:29
Just to remember a simple example of JPA 2 Criteria API usage...
  • to perform a simple SELECT * FROM PLANE;
		CriteriaBuilder cb = em.getCriteriaBuilder();
		CriteriaQuery<Plane> criteria = cb.createQuery(Plane.class);
		Root<Plane> plane = criteria.from(Plane.class);
		criteria.select(plane);
		List<Plane> planes = em.createQuery(criteria).getResultList();
@startuml
actor PayRollCron
participant PayDayTransaction
participant PayRoll
participant PayRollDatabase
participant Employee
participant PayCheck
@enduml
@ericlbarnes
ericlbarnes / bower.json
Last active January 8, 2024 01:52
Gulp, Bower, Bootstrap Sass, FontAwesome
{
"name": "project",
"version": "0.0.0",
"authors": [
"Eric Barnes <[email protected]>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
@rponte
rponte / GenerateSimplePdfReportWithJasperReports.java
Last active May 7, 2022 10:25
Example on how to generate a simple pdf report with JasperReports
package rponte.report;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.JRException;
import sys
import collections
import gridfs
import io
import psycopg2
import pymongo
import random
import time
# For fairness use the same chunk size - 512k.
@mrrooijen
mrrooijen / README.md
Created August 15, 2012 01:30
Heroku SSL Endpoint, RapidSSL

Heroku SSL Endpoint

Assumptions:

  • You want to enable SSL for your domain.
  • You want to go with RapidSSL.
  • Your domain name is www.domain.com during this example.
  • You want to encrypt requests for a single domain (no wildcard)
  • You want to apply this certificate to Heroku's SSL Endpoint
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--