This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Find latest version here https://jdk.java.net/archive/ | |
# | |
brew list wget || brew install wget | |
wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz | |
tar xvf openjdk-11*_bin.tar.gz | |
sudo mv *.jdk /Library/Java/JavaVirtualMachines/. |
This file contains hidden or 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
keytool -exportcert -alias [KEY_STORE_ALIAS] -keystore [KEY_STORE_FILE_PATH] -storepass [KEY_STORE_PASSWORD] | |
| xxd -p | |
| tr -d "[:space:]" | |
| echo -n [PACKAGE_NAME] `cat` | |
| openssl dgst -sha256 | |
| cut -d' ' -f2 | |
| tr -d "[:space:]-" | |
| xxd -r -p | |
| base64 | |
| cut -c1-11 |
This file contains hidden or 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
// If you are having multiple mongoose connection, please iterate it and get the reference. | |
mongoose.connections[0].collections("collectionname").dropIndex("propertyName",callback) |
This file contains hidden or 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
// After Registsering all mongoose schema, run below code to make versionKey false in all registerd schemas. | |
for(var i in mongoose.modelSchemas){ | |
mongoose.modelSchemas[i].options.versionKey = false; | |
} |