Skip to content

Instantly share code, notes, and snippets.

@synu
synu / jq
Last active February 15, 2025 08:47
[jq]
# get array json -> get all elements -> get dateTime node -> return all as array -> sort
jq "[.[] | .dateTime] | unique | sort" 2022-10-12_16-42-38.json
jq "[.[] | .dateTime] | unique | sort | reverse" 2022-10-12_16-42-38.json
# get first and last element of array
jq "[.[] | .dateTime] | unique | first(.[]),last(.[])" 2022-10-13_09-52-19.json
# group elements by specific field value and count them
jq 'group_by(.diagnostic.id)|map(.[0].diagnostic.id,length)' "2022-10-12_16-41-10(1).json"
@synu
synu / git
Last active April 17, 2025 21:32
[git] git #git
# init git in existing direcotry then set origin to existing remote rep
git init
git remote add origin <url>
# if remote is set before, change it -> git remote set-url origin https://bicecs@dev.azure.com/bicecs/BitC-Platform/_git/anomaly-detection-2-0-model
git fetch origin
git checkout -b develop origin/develop
@synu
synu / maven
Last active January 20, 2022 07:23
[maven] maven #maven
# deploy file manually
mvn deploy:deploy-file -Dpackaging="jar" -DrepositoryId="bitc-platform" -Durl="https://pkgs.dev.azure.com/bicecs/BitC-Platform/_packaging/bitc-platform/maven/v1" -DgroupId="com.bosch.cs.bitc" -DartifactId="naive-prediction-matlab" -Dversion="1.1.1" -Dfile="NaiveSyntheticPredictor.jar"
mvnDebug clean install -Papi-tc-algorithms-cluj -DforkCount=0
# when strange error stack printed on compile try use
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#forceJavacCompilerUse
@synu
synu / jaeger
Created May 5, 2021 06:35
[jaeger] jaeger #jaeger
# docker-compose.yml
version: "3.3"
services:
jaeger-allinone:
image: jaegertracing/all-in-one:1.7
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp