Skip to content

Instantly share code, notes, and snippets.

Avatar

Arda Beyazoğlu ardabeyazoglu

  • Ljubljana, Slovenia
View GitHub Profile
@ardabeyazoglu
ardabeyazoglu / php-fpm-memory-usage.sh
Created Oct 6, 2018
How to check php-fpm(fastcgi) memory usage?
View php-fpm-memory-usage.sh
```
# 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 Nov 22, 2019
bash script to sign cordova/phonegap android apks altogether
View sign-android-apks.sh
#!/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="*****"