View audit.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function contains() { | |
local n=$# | |
local value=${!n} | |
for ((i=1;i < $#;i++)) { | |
if [ "${!i}" == "${value}" ]; then | |
echo "y" | |
return 0 | |
fi | |
} | |
echo "n" |
View MockitoAnnotationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.pierre.mockito; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.*; | |
import org.mockito.junit.MockitoJUnitRunner; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; |
View bashtutorial.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
References: | |
https://ryanstutorials.net/bash-scripting-tutorial/ Bash tutorial | |
https://ryanstutorials.net/linuxtutorial/ Linux tutorial | |
http://tldp.org/LDP/abs/html/string-manipulation.html string manipulation in bash | |
View gist:283abc56a725c003e7422a8a3f67c744
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.pierre.streams; | |
import org.junit.jupiter.api.Test; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
View gist:970665371b0ab556dcc16be60d3861e3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.pierre.java11tests; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.StringJoiner; | |
public class ProcessTest { | |
public static void main(String[] args) throws IOException { | |
ProcessBuilder pb = new ProcessBuilder("cmd","/C", "dir d:\\temp"); |
View gist:a6c144fc01242978b174b2fecdae526b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.juliusbaer.nexus.nexusswaggerclient; | |
import java.util.List; | |
import io.swagger.client.ApiClient; | |
import io.swagger.client.ApiException; | |
import io.swagger.client.api.AssetsApi; | |
import io.swagger.client.api.ComponentsApi; | |
import io.swagger.client.api.SearchApi; | |
import io.swagger.client.model.AssetXO; |
View gist:8d33fac76433e1aae4a7ee461b92d3aa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/sass/node-sass/issues/2455 | |
[centos@localhost bin]$ find / -name node-sass 2> /dev/null | |
/home/centos/.npm/registry.npmjs.org/node-sass | |
/home/centos/.npm/node-sass | |
/home/centos/node-v0.10.30/node_modules/node-sass | |
/home/centos/node-v0.10.30/node_modules/node-sass/bin/node-sass | |
/home/centos/node-v0.10.30/node_modules/.bin/node-sass | |
/home/centos/node_modules/.bin/node-sass | |
/home/centos/node_modules/node-sass |
View gist:d85c8e96437a4e7236af011d11384904
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("parsing JSON file "); | |
ClassLoader classLoader = getClass().getClassLoader(); | |
File file = new File(classLoader.getResource("bikes.json").getFile()); | |
ObjectMapper objectMapper = new ObjectMapper(); | |
JsonNode jsonNode = objectMapper.readTree(file); | |
System.out.println(jsonNode); | |
Properties props = new Properties(); | |
props.setProperty("resource.loader", "file"); | |
//props.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); | |
View pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.pierre</groupId> | |
<artifactId>pvabwebsockets</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>javax</groupId> | |
<artifactId>javaee-api</artifactId> |
View pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycompany</groupId> | |
<artifactId>AnApp</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>AnApp</name> |
NewerOlder