Bash script to:
- Iterate all commits made within a Git repository.
- List every object at each commit.
// idiomatism to dump stacktrace | |
StringWriter sw = new StringWriter(); | |
e.printStackTrace(new PrintWriter(sw)); | |
String yourStack = sw.toString() |
#!/bin/bash | |
grep -v '^#' < .projects.gws | { while IFS="|" read -r name repo; do | |
if [ -n "$name" ]; then | |
( | |
cd "$name" | |
echo "$name ;" | |
git "$@" | |
) | |
fi | |
done |
#0. Only aliases, one per line | |
#1. warning this file is auto-sorted, no script here! | |
alias ale="vim ~/.bash_aliases && sort -o ~/.bash_aliases ~/.bash_aliases && source ~/.bash_aliases" | |
alias dc="docker-compose" | |
alias dcp="docker-compose -f postgres-docker-compose.yml " | |
alias dcs="docker-compose -f sqlserver-docker-compose.yml " | |
alias doc-passif="start /home/philippe/Documents/htoh/amadeus/passif/" | |
alias drive-ext="sshfs -o ssh_command='ssh -4 -p 443' [email protected]:/volume1/public/htoh/ ~/Documents/htoh-drive" | |
alias drive="sshfs fil@syno:/volume1/public/htoh/ ~/Documents/htoh-drive" | |
alias g="git" |
# On release localement: | |
# - On laisse l'utilisateur choisir de pousser on pas son tag et son commit | |
# - Au choix remplacer l'install par un deploy, ou revenir sur le tag pour lancer le deploy. | |
# mvn -q versions:set -DnewVersion=1.1.0-SNAPSHOT -DprocessAllModules -DgenerateBackupPoms=false | |
JAVA_HOME=/opt/lib/jdk11/ | |
echo set RELEASE version | |
mvn -q versions:set -DremoveSnapshot -DprocessAllModules |
# This is Git's per-user configuration file. | |
# [user] | |
# name = | |
# email = | |
# Windows specific uncomment this on windows | |
# [mergetool "kdiff3"] | |
# path = C:/Program Files/KDiff3/kdiff3.exe | |
# trustExitCode = false | |
#[difftool "kdiff3"] |
/** | |
* Server sent event dom using Spring webflux. | |
* | |
* @author Philippe.DEMANGET | |
*/ | |
@RestController | |
@RequestMapping("/event/stream") | |
public class EventStreamController { | |
private Logger logger = LoggerFactory.getLogger(getClass()); |
public static <ROW> Callback<TableColumn<ROW, Boolean>, TableCell<ROW, Boolean>> getCheckboxCell(){ | |
return column -> { | |
CheckBoxTableCell<ROW, Boolean> cell = new CheckBoxTableCell<>(); | |
cell.setAlignment(Pos.CENTER); | |
return cell; | |
}; | |
} | |
public static <ROW, T extends Temporal> Callback<TableColumn<ROW, T>, TableCell<ROW, T>> getDateCell( | |
DateTimeFormatter format) { |
# | |
# use npm install js-yaml | |
const fs = require('fs') | |
const jsyaml = require('js-yaml') | |
const mkdirSync = function (dirPath) { | |
try { | |
fs.mkdirSync(dirPath) |
/** | |
* Group on 2 levels | |
*/ | |
protected <K,V> Map<K, Map<K,List<V>>> groupByFields2 (List<V> modelList,Function<? super V, ? extends K> classifier1,Function<? super V, ? extends K> classifier2) { | |
Collector<V, ?, Map<K, List<V>>> groupingBy2 = Collectors.groupingBy(classifier2); | |
Collector<V, ?, Map<K, Map<K,List<V>>>> groupingBy = Collectors.groupingBy( | |
classifier1 | |
,groupingBy2 | |
); |