Skip to content

Instantly share code, notes, and snippets.

View coseos's full-sized avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
@coseos
coseos / xsXSLP.cs
Created October 15, 2014 17:03
XSL process in C# (as replacement for MSXML.exe)
/**
* xsXSLP - C#/.net minimal XSL processor
*
* Copyright 2010-2014: coseos.com/K2IT Gesellschaft fuer Informationstechnik mbH
* http://www.coseos.com
*
* http://www.coseos.com/blog/ffcc57a6-f65c-4316-a3a2-c3d7f3987f9a
*
* License
*
@coseos
coseos / Tjython.java
Last active August 29, 2015 14:14
Tjython
/*
*
* Tjython - Tomcat / Jython webserver
*
* Copyright 2010-2014: coseos.com/K2IT Gesellschaft fuer Informationstechnik mbH
* http://www.coseos.com
*
* http://www.coseos.com/blog/ffcc57a6-f65c-4316-a3a2-c3d7f3987f9a
*
* License
@coseos
coseos / warShot.xml
Created April 15, 2015 20:21
Create a snapshot of a web application with warShot to a .war file
<?xml version="1.0" encoding="UTF-8"?>
<project name="warShot" default="warShot" basedir="..">
<!--
Copyright (c) 2014-2015
coseos / K2IT Gesellschaft fuer Informationstechnik mbH
Thorsten Lorenz
All rights reserved.
@coseos
coseos / 951ade11-2b60-488d-a5d9-6d694be3d810.sql
Created October 20, 2016 16:41
Postgres number of affected rows
-- Oracle
SELECT SQL%ROWCOUNT FROM DUAL;
-- Postgres 1
GET DIAGNOSTICS int_var = ROW_COUNT;
-- Postgres 2
WITH rows AS (
INSERT | UPDATE
@coseos
coseos / VMwareVMXsettingsMostWanted.md
Created January 13, 2018 12:19
VMware .vmx settings most wanted

VMware .vmx settings most wanted

The most important changes you'll ever need in your VMs .vmx file

  1. bios.bootdelay

Set the bootdelay in milliseconds

Example

[Unit]
Description=derbyDB systemd service
After=syslog.target
[Service]
User=dbuser
WorkingDirectory=/home/dbuser/Database/DerbyDB
Type=simple
@coseos
coseos / java-groovy-libraries.md
Last active May 23, 2020 18:04
Java/Groovy libraries

HowTo: Java and Groovy libraries

You can put .jar files in the ${JRE_HOME}/lib/ext folder to make a library available to the Java Runtime without any further CLASSPATH setting (like setting the environment variable or adding a -cp/-classpath parameter)

You can put .jar files in the ${HOME}/.groovy/lib folder to make a library available to Groovy in the same manner

This will only work on your local machine, so keep track of the libraries you use.

Another trick (for Groovy) is to add to the classpath at runtime with something like:

@coseos
coseos / install-oracle-jdbc-driver.sh
Created January 25, 2021 10:05
Simple script to install Oracle proprietary JDBC driver into local maven repository
#!/bin/bash
VERSION=19.8.0.0
JARFILE=ojdbc8-${VERSION}.jar
ARTIFACTID=coseos-oracle-jdbc8
GROUPID=com.oracle
MVN=$(which mvn)
function install {
@coseos
coseos / X3_4_1968_USAscii.java
Created February 23, 2021 21:53
This Java class describes the non-printable control characters, by name, from the ANSI X3.4-1968 standard 7-bit charset, also known as US Ascii or ECMA-6.
package com.coseos.standards.ansi.x3;
/** This class describes the non-printable control characters, by name, from the ANSI X3.4-1968 standard 7-bit charset, also known as US Ascii or ECMA-6.
'I have also approved recommendations of the Secretary of Commerce regarding standards for recording the Standard Code for Information Interchange on magnetic tapes and paper tapes when they are used in computer operations. All computers and related equipment configurations brought into the Federal Government inventory on and after July 1, 1969, must have the capability to use the Standard Code for Information Interchange and the formats prescribed by the magnetic tape and paper tape standards when these media are used.'
Lyndon B. Johnson, March 11th 1968
*/
public class X3_4_1968_USAscii {
@coseos
coseos / essential-properties-4-pom.xml
Created February 24, 2021 07:27
Essential properties for pom.xml with UTF-8 encoding and Java version 11
<!--
The essential properties for pom.xml include
- UTF-8 encoding for source files
- compiler version for source and target / Java 11
-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>