Skip to content

Instantly share code, notes, and snippets.

View K0NRAD's full-sized avatar

Hauke K0NRAD

  • 08:05 (UTC +02:00)
View GitHub Profile
@K0NRAD
K0NRAD / hrinkwrap-resolver-depchain.xml
Created October 13, 2015 19:53
hrinkwrap-resolver-depchain
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<version>2.1.0</version>
<scope>test</scope>
<type>pom</type>
</dependency>
@K0NRAD
K0NRAD / export-import-docker-image
Created November 11, 2015 10:43
Import / Export Docker Image
Export:
docker commit <CONTAINER ID> <IMAGE-NAME>
e.g. (Oracle XE image)
docker commit d1db2b oracle-xe
docker save IMAGE-NAME > <IMAGE-NAME>.tar
e.g.
@K0NRAD
K0NRAD / pom.xml
Created November 24, 2015 15:52
Executable JAR's with maven
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<archive>
<manifest>
<mainClass>path.to.your.main.Class</mainClass>
@K0NRAD
K0NRAD / DynamicTree.java
Created February 16, 2016 21:02
Dynamic tree with recursive flatting
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;
public class DynamicTree<T> {
private T value;
private List<DynamicTree<T>> dynamicTrees;
public DynamicTree(T value, List<DynamicTree<T>> dynamicTrees) {
this.value = value;
@K0NRAD
K0NRAD / script.sql
Created February 19, 2016 21:10
Oracle: Workaround for PASSWORD UNEXPIRE
SELECT username, account_status FROM dba_users WHERE username='SYSTEM';
SELECT 'ALTER USER '|| name ||' IDENTIFIED BY VALUES '''|| spare4 ||';'|| password ||''';' FROM sys.user$ WHERE name='SYSTEM';
ALTER USER SYSTEM IDENTIFIED BY VALUES 'S:8E533D4812DFD460BB9CDB06CEE19681770E9D612CB02B4979D9B4389DAF;2D594E86F93B17A1';
@K0NRAD
K0NRAD / setGitGlobal.sh
Created March 30, 2016 20:18
Use Bracket as core.editor for GIT
git config --global core.editor "open -nW -a 'Brackets'"
@K0NRAD
K0NRAD / MakeBootableUsbStickFromIsoOnOSX.txt
Created April 21, 2017 14:29
Make bootable USB stick from ISO on OSX
# HOWTO: Make bootable USB stick from ISO on OSX
# determine /dev/diskN name of USB stick (e.g. /dev/disk2)
diskutil list
# convert image.iso to image.dmg (hdiutil adds .dmg automatically)
hdiutil convert -format UDRW -o image image.iso
# unmount (don't eject!) usb stick
diskutil unmountDisk /dev/disk2
@K0NRAD
K0NRAD / index.html
Last active April 25, 2017 16:42
Swagger-UI with CORS and Cookies
// Add the follow Code Snippet to index.html from swagger-ui v2.x.x
// ...
window.swaggerUi = new SwaggerUi({
url: url,
// --- --- --- ----
useJQuery: true,
authorizations: {
makeCredentialed: function() {
this.xhrFields = {withCredentials: true}; // The important bit, along with useJQuery
@K0NRAD
K0NRAD / tacho-pin-belegung.txt
Last active August 22, 2020 10:48
Pinbelegung_Kombiinstrument_3er_BMW
weißer Stecker:
1 - Kontrolleuchte Fernlicht
2 - Instrumentenbeleuchtung (Klemme 58g)
3 - Kontrolleuchte Blinker rechts
4 - Kontrolleuchte Blinker links
5 - Warnleuchte elektr. Getriebesteuerung
6 - nicht belegt
7 - nicht belegt
8 - Warnleuchte DDE
@K0NRAD
K0NRAD / del_ms_lastUpdate.sh
Last active July 27, 2022 08:55
Delete *.lastUpdated files in .m2 local maven repository
#!/bin/sh
find ~/.m2 -name *.lastUpdated -delete