Mulitrename
rename "s/DCIM/2010/" *
This command replace DCIM to 2010 in names of all directorie's files.
Related cards:
plantuml all keywords
You can get all keywords from plantuml (include skin parameters):
java -Djava.awt.headless=true -jar plantuml.jar -language
Groups of keywords:
- type
- keyword
- preprocessor
- skinparameter
- color
Quick access to all skin parameter...
Gradle. Attach task to build lifecycle
It's easy. Just add to somewhere after your task definition:
processTestResources.dependsOn recreateDatabase
- processTestResource - default task (phase of build lifecycle)
- recreateDatabase - your custom task, that will be called befor...
Exclude file from resource in Gradle
If you want to exclude one file from resource, you may use this snippet:
sourceSets {
main {
resources {
exclude '**/*.bak'
}
}
}
How to send SOAP request with curl
curl -d @message.xml -H "Content-Type: text/xml; charset=utf-8" "endpoint"
where:
- message.xml - a file with the SOAP request
- endpoint - the URL of the web-service endpoint
How to solve Antergos-keyring is unknown trust
If you see
signature from "Antergos Build Server (Automated Package Build System) <admin@antergos.org>" is unknown trust
execute:
sudo pacman-key --refresh-keys
sudo pacman -Sy antergos-keyring
Gradle and dbmaintain
Introduction
dbmaintain is plugin (best for my opinion) that allowes to safely migrate dbscheme. It has excellent support for Maven and Ant but not for Gradle. But Gradle has excellent support for Ant, so we can call dbmaintain ant ...
Git Usefull comands
git clean -d -f [path]
Remove untracked files, that described in ignore lists. It's usefull if you switch between branches, which of them contains removed (and ignored) file, that exists in other.
Add new resource folder in Gradle
If you want to add new resource folder to Gradle build, use this snippet:
sourceSets {
main {
resources {
srcDir 'src/main/java'
}
}
}
.java (.groovy and *scala) file will be skipped on build from resources.
Linux rescue
In grub menu select autoline and press e
. Find the line which is started with linux
and append
init=/bin/sh
to the end of this. After you will boot it (Ctrl-x), you will get a root shell immediately. But the filesystme will...