Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
@coseos
coseos / xsXSLP.cs
Created Oct 15, 2014
XSL process in C# (as replacement for MSXML.exe)
View xsXSLP.cs
/**
* 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
*
View Tjython.java
/*
*
* 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 Apr 15, 2015
Create a snapshot of a web application with warShot to a .war file
View warShot.xml
<?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.
View 951ade11-2b60-488d-a5d9-6d694be3d810.sql
-- 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 Jan 13, 2018
VMware .vmx settings most wanted
View VMwareVMXsettingsMostWanted.md

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

View derbydb.service
[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
Java/Groovy libraries
View java-groovy-libraries.md

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 Jan 25, 2021
Simple script to install Oracle proprietary JDBC driver into local maven repository
View install-oracle-jdbc-driver.sh
#!/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 Feb 23, 2021
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.
View X3_4_1968_USAscii.java
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 Feb 24, 2021
Essential properties for pom.xml with UTF-8 encoding and Java version 11
View essential-properties-4-pom.xml
<!--
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>