Skip to content

Instantly share code, notes, and snippets.

View ardabeyazoglu's full-sized avatar

Arda Beyazoğlu ardabeyazoglu

  • Ljubljana, Slovenia
View GitHub Profile
@ardabeyazoglu
ardabeyazoglu / php-fpm-memory-usage.sh
Created October 6, 2018 14:10
How to check php-fpm(fastcgi) memory usage?
```
# 5.6+
ps -ylC php-fpm5.6 | awk '{x += $8;y += 1} END {print "FPM Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
ps -ylC php-fpm7.2 | awk '{x += $8;y += 1} END {print "FPM Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
# older
ps -ylC php-fpm | awk '{x += $8;y += 1} END {print "FPM Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
```
@ardabeyazoglu
ardabeyazoglu / sign-android-apks.sh
Created November 22, 2019 14:38
bash script to sign cordova/phonegap android apks altogether
#!/bin/bash
APK_ARM_32="platforms/android/app/build/outputs/apk/armv7/release/app-armv7-release-unsigned.apk"
APK_X86_32="platforms/android/app/build/outputs/apk/x86/release/app-x86-release-unsigned.apk"
APK_ARM_64="platforms/android/app/build/outputs/apk/arm64/release/app-arm64-release-unsigned.apk"
APK_X86_64="platforms/android/app/build/outputs/apk/x86_64/release/app-x86_64-release-unsigned.apk"
// your keystore file and secret
KEYSTORE_PATH="/path/to/keystore"
KEYSTORE_PASS="*****"