Skip to content

Instantly share code, notes, and snippets.

View hirenrojasara's full-sized avatar

Hiren Soni hirenrojasara

  • Ahmedabad, India
View GitHub Profile
@hirenrojasara
hirenrojasara / install_openjdk11.sh
Last active October 3, 2019 06:43
Install OpenJdk11 on IOS
#!/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/.
@hirenrojasara
hirenrojasara / android-hash-gen-sms-retriver-api.txt
Created January 5, 2019 08:01
Android Automatic SMS Verification with the SMS Retriever API - HASH Generation on MAC
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
@hirenrojasara
hirenrojasara / Drop index from mongoose model programatically.js
Last active April 26, 2021 09:30
Drop index from mongoose model programatically
// If you are having multiple mongoose connection, please iterate it and get the reference.
mongoose.connections[0].collections("collectionname").dropIndex("propertyName",callback)
@hirenrojasara
hirenrojasara / index.js
Last active November 25, 2015 12:20
Mongoose hide version key / __v for all collections / schemas
// 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;
}