Skip to content

Instantly share code, notes, and snippets.

View rhapsodixx's full-sized avatar
🇵🇸
まだまだだね

pgautama rhapsodixx

🇵🇸
まだまだだね
View GitHub Profile
@rhapsodixx
rhapsodixx / php-pools.md
Created December 8, 2020 07:04 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@rhapsodixx
rhapsodixx / gist:4a873b84fe6d249d53f2
Created May 24, 2014 07:42
XML RPC Test RajaBiller
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://202.43.173.234/transaksi/" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@rhapsodixx
rhapsodixx / gist:11257345
Created April 24, 2014 14:46
Get Fingerprint for Debug Keystore
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
@rhapsodixx
rhapsodixx / toggleFullScreen.java
Last active May 24, 2019 08:00
Toggle Fullscreen in Android
public void toggleFullscreenMode( boolean isFullscreen )
{
// Build.VERSION.SDK_INT >= 16
View decorView = getWindow().getDecorView();
if (getActionBar().isShowing()) {
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
getActionBar().hide();
} else {
int uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
@rhapsodixx
rhapsodixx / .gitignore
Created April 23, 2014 07:40
Android Git Ignore
# Mac & Android Studio Environment
/.idea/workspace.xml
.DS_Store
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
@rhapsodixx
rhapsodixx / EasyInstallComposer
Last active August 29, 2015 14:00
Easy Way to Install Composer on Ubuntu
$ curl -s http://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer.phar
$ alias composer='/usr/local/bin/composer.phar'
@rhapsodixx
rhapsodixx / Gcm
Last active August 29, 2015 14:00
Simple GCM Call
<?php
/**
* panji
* 2013 08 08
*/
class Gcm
{
protected static $apiUrl = "https://android.googleapis.com/gcm/send";