Skip to content

Instantly share code, notes, and snippets.

View axi92's full-sized avatar

axi92 axi92

  • Vienna
View GitHub Profile
$ mvn -X package
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: de_AT, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-23-generic", arch: "amd64", family: "unix"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
@axi92
axi92 / gist:e1a262b91f549b3db0cf68240e9bb560
Created July 23, 2018 11:35
simple-maven-project-with-tests java8
$ mvn -X package
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: de_AT, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-23-generic", arch: "amd64", family: "unix"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
Success: /var/log/boot/cloudSuccess: /var/log/boot/cloud[rancher@rancher ~]$ cat /var/log/boot/cloud-init-save.log
time="2019-08-14T09:41:33Z" level=debug msg="START: [cloud-init-save] in /"
time="2019-08-14T09:41:33Z" level=info msg="Running cloud-init-save"
time="2019-08-14T09:41:33Z" level=info msg=SaveCloudConfig
time="2019-08-14T09:41:33Z" level=debug msg="init: SaveCloudConfig(pre ApplyNetworkConfig): netconf.NetworkConfig{PreCmds:[]string(nil), DHCPTimeout:0, DNS:netconf.DNSConfig{Nameservers:[]string(nil), Search:[]string(nil)}, Interfaces:map[string]netconf.InterfaceConfig(nil), PostCmds:[]string(nil), HTTPProxy:"", HTTPSProxy:"", NoProxy:"", WifiNetworks:map[string]netconf.WifiNetworkConfig(nil), ModemNetworks:map[string]netconf.ModemNetworkConfig(nil)}"
time="2019-08-14T09:41:33Z" level=info msg="Apply Network Config"
time="2019-08-14T09:41:33Z" level=debug msg="Config: &netconf.NetworkConfig{PreCmds:[]string(nil), DHCPTimeout:10, DNS:netconf.DNSConfig{Nameservers:[]string(nil), Search:[]stri
@axi92
axi92 / config.js
Created November 8, 2019 09:27
markdown-css
```
const config = {
"consumer_key": "00000000-0000-0000-0000-000000000000",
"consumerPrivateKey": "-----BEGIN RSA PRIVATE KEY-----\00000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n00000000000000000000000000000
@axi92
axi92 / nexus3-uploader.sh
Created January 21, 2020 09:23
This script uploads a folder with all its files into a sonatype nexus3 repository.
#!/bin/bash
# # ./nexus3-uploader.sh username password repo folder
url="http://domain.com:8081/nexus/repository/$repository/"
if [ $# -eq 0 ]; then
# Read Nexus3 Repository
echo -n "Nexus3 repository: "
read repository
# Read folder to upload
@axi92
axi92 / gist:b75502aad942d1c775867e111f3f7930
Created July 9, 2020 10:42
Chroot into raspi sd card
sudo proot -q qemu-arm -S /media/user/rootfs # <-mount path
@axi92
axi92 / report-ip-to-telegram-bot.sh
Created January 18, 2021 12:30
Send hostname and ip from device via telegram bot to channel or user
#!/bin/bash
TEXT="Hostname: $(hostname) - IP: $(hostname -I | awk '{print $1}')"
CHATID=""
TOKEN=""
curl -s -X POST \
-H 'Content-Type: application/json' \
-d '{"chat_id": "'"${CHATID}"'", "text": "'"${TEXT}"'", "disable_notification": false}' \
https://api.telegram.org/bot${TOKEN}/sendMessage
@axi92
axi92 / sample-server.js
Created October 7, 2021 06:35
Opcua server never exits
/*global require,setInterval,console */
const opcua = require("node-opcua");
// Let's create an instance of OPCUAServer
const server = new opcua.OPCUAServer({
port: 4334, // the port of the listening socket of the server
resourcePath: "/UA/MyLittleServer", // this path will be added to the endpoint resource name
buildInfo: {
productName: "MySampleServer1",
buildNumber: "7658",
@axi92
axi92 / pre-commit
Last active May 18, 2022 14:43
pre-commit git hook prevent binaries from commiting
#!/bin/sh
staginlist=(`git diff --name-only --cached`)
binarylist=()
for filelist in ${staginlist[*]}
do
grep -Iq . ${filelist}
if [ $? -ne 0 ]
then
@axi92
axi92 / green.xml
Created April 13, 2023 12:33
Junit xml red/green example
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
<testsuite name="NPM Audit Advisories">
<testcase name="MODERATE: 1091459 - Server-Side Request Forgery in Request">
</testcase>
<testcase name="HIGH: 1091653 - xml2js is vulnerable to prototype pollution ">
</testcase>
</testsuite>
</testsuites>