Skip to content

Instantly share code, notes, and snippets.

View ianmustafa's full-sized avatar

Ian Mustafa ianmustafa

  • Bojonegoro, Indonesia
View GitHub Profile
@ianmustafa
ianmustafa / 0-preface.md
Last active March 21, 2023 15:35
PHP: cURL vs file_get_contents

PHP: cURL vs file_get_contents()

This is a very often asked question among PHP developers. This gist aims to answer it.

Case study

RajaOngkir API.

Benchmark

  • Done in DigitalOcean, cheapest droplet ($5), located in Singapore, using Ubuntu Server 18.04.3. (Referral link for anybody interested.)
  • System configured with (mostly) default configuration, using what's available from the package installation.
@ianmustafa
ianmustafa / httpclient.php
Created December 18, 2019 14:13
Simple HTTP Client for PHP using cURL
<?php
if (!function_exists('httpclient')) {
function httpclient($params = [], $debug = false)
{
// Pastikan parameter URL terisi
if (! isset($params['url'])) {
return false;
}
@ianmustafa
ianmustafa / bledheg.php
Last active April 22, 2021 14:45
Bledheg generator
#! /usr/bin/env php
<?php
$input = $argv[1] ?? null;
if (is_null($input) || $input < -5 || $input > 20) {
exit("Bilangan bulat tidak termasuk dalam rentang yang diizinkan: -5 s/d 20!\n");
}
if ($input < 1) {
exit();
@ianmustafa
ianmustafa / INDEX.md
Last active May 18, 2022 08:14
AutoEq Preset for KZ ✕ crinacle CRN (ZEX Pro)

KZ x Crinacle CRN (ZEX Pro)

See usage instructions for more options and info.

Parametric EQs

In case of using parametric equalizer, apply preamp of -4.7dB and build filters manually with these parameters. The first 5 filters can be used independently. When using independent subset of filters, apply preamp of -4.6 dB.

Type Fc Q Gain