Skip to content

Instantly share code, notes, and snippets.

@valter-jnr
valter-jnr / gist:8deab61eca69972aef12f1f756391c66
Created April 7, 2022 23:00
Fix no main manifest attribute, in jar Error in Spring Boot
Fix no main manifest attribute, in jar Error in Spring Boot
Add spring-boot-maven-plugin in build section of your pom.xml. If it is not added then add the below lines
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.5.RELEASE</version>
<executions>
{
"$expr": {
"$not": {
"$cmp": [{
"$let": {
"vars": {
"updated": {
"$objectToArray": "$updateDescription.updatedFields"
}
},
defaults write com.3tsoftwarelabs.robo3t NSRequiresAquaSystemAppearance -bool yes
db.getCollection('places').distinct("address.complete").forEach(fieldValue => {
var count = db.getCollection('places').find({"address.complete": fieldValue }).count();
if (count > 1) {
db.getCollection('places').find({"address.complete": fieldValue }).forEach(doc => {
if (count > 1) {
db.getCollection('places').remove({ _id: doc._id });
count--;
}
});}
});
You could use the -o switch to specify your output format:
$ ps -eo args
From the man page:
Command with all its arguments as a string. Modifications to the arguments may be shown. [...]
db.places.createIndex({name: "text" , description: "text", "address.complete" : "text"})
@valter-jnr
valter-jnr / Remove Fat FIle from git
Last active July 6, 2021 13:26
git this exceeds file size limit of 100.0 mb
git filter-branch --tree-filter 'rm -rf path/to/your/file' HEAD
git push
Or You can use the git suggested tool
git filter-repo --invert-paths --path-match target --force
lsblk
df -hT /dev/xvdf
df -hT /dev/xvda1
xfs_growfs /dev/xvdf
sudo xfs_growfs /dev/xvdf
sudo resize2fs /dev/xvdf
@valter-jnr
valter-jnr / Import CVS TSV to mongo
Created September 17, 2019 17:17
Import CVS / TSV to mongo
tr ";" "\t" < /Users/admin/Desktop/NCM.csv | mongoimport --uri mongodb+srv://sigaProdServices:12SjJoTmpCxhuqMb@sigacluster0-9ifpv.mongodb.net/sigaProd --collection ncm --type tsv --headerline --drop
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_221`