Skip to content

Instantly share code, notes, and snippets.

View FachrulCH's full-sized avatar
🇮🇩
Bismillah

Fachrul Ch FachrulCH

🇮🇩
Bismillah
View GitHub Profile
@FachrulCH
FachrulCH / php.ini xdebug
Created March 26, 2015 14:58
Setting php.ini biar bisa debug pake xdebug
[XDebug]
; Sesuaikan lokasi webserver folder debug lo
zend_extension = \xampp-portable\php\ext\php_xdebug-2.3.2-5.4-vc9.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
; Sesuaikan lokasi webserver folder debug lo
xdebug.profiler_output_dir = "\xampp-portable\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
@FachrulCH
FachrulCH / jawaban.php
Created December 20, 2015 07:39
Contoh soal logika algoritma PHP
<?php
// Soal: http://4.bp.blogspot.com/-LoQbNsgHIG0/VnZZvt-uRUI/AAAAAAAABOs/cpk594HiYC8/s400/contoh%2Bsoal%2Blogika%2Bphp.png
// jawaban https://www.facebook.com/ihvan.design
$totalUang = 1575250;
$pecahan = [
['pecahan' => 100000,
'jumlah' => 0,],
['pecahan' => 50000,
'jumlah' => 0,],
['pecahan' => 20000,
@FachrulCH
FachrulCH / Dompdf_gen.php
Created June 19, 2016 04:46
cetak laporan dengan DOMPDF
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Name: DOMPDF
*
* Author: Jd Fiscus
* jdfiscus@gmail.com
* @iamfiscus
*
*
@FachrulCH
FachrulCH / abtestlocal.sh
Created March 2, 2017 13:34
Apache benchmark ala ala :D
#!/bin/bash
ab -k -c 350 -n 20000 localhost:8888/api/v1/loadtest/
# Artinya:
# membuat 350 koneksi concurrency jumlah user yg buka web bersamaan
# dengan jumlah request sebanyak 20.000
# jumlah -n dengan -c yang tinggi akan berbanding lurus dengan stress test yg diterima server
# -k hanya untuk enable fungsional "KeepAlive" seperti pada browser
@FachrulCH
FachrulCH / chromedriver-install.sh
Created March 9, 2017 11:17
install chromeDriver ubuntu
#yang terakhir versi berapa?
wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/Downloads
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
chmod +x ~/Downloads/chromedriver
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
+---------+------------------------------------------------------------+
| VERB | DESKRIPSI |
+---------+------------------------------------------------------------+
| GET | Digunakan untuk mengambil data. |
| POST | Digunakan untuk membuat data. |
| PUT | Digunakan untuk mengganti/mengubah data atau collections. |
| DELETE | Digunakan untuk menghapus data. |
+---------+------------------------------------------------------------+
+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| STATUS CODE | DESKRIPSI |
+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 200-OK | Request dikatakan berhasil, dan data dari server bisa dilihat di dalam body response dan header nya. |
| 201-Created | Request berhasil terpenuhi, dan hasilnya terbentuk data baru di server |
| 202-Accepted | Request berhasil diterima untuk di proses, teta
@FachrulCH
FachrulCH / work_with_me_manual.md
Last active October 29, 2018 23:28
How to work with Fachrul CH
- Last update: 27-Okt-2018
- Name: Fachrul Choliluddin
- Nickname: Alul

My Style

  • I loved to work in public area, where I can enjoy the ambiance as white noise, often I put headset on to listen nature white noise
  • My mind like rabbit, I think in not linear line; I'll jump very rapidly from limited evidence to an explanation.
  • I like to share knowledge with other, sometime I learn a lot from pairing with other
  • I am comfortable changing direction, shifting and adapting. I also love new ideas but this can be challenging for people
#!/usr/bin/env bash
# Script for start Python's simple http server in background
# Usage command:
# - ./gundala-server.sh start
# - ./gundala-server.sh stop
function start() {
# Start server
python3 -m http.server 8000 &> /dev/null &