Skip to content

Instantly share code, notes, and snippets.

View bastomiadi's full-sized avatar

Bastomi Adi Nugroho bastomiadi

View GitHub Profile
@ianmustafa
ianmustafa / 0-preface.md
Last active May 8, 2024 13:57
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.
@adnan360
adnan360 / lamp-on-void-linux.md
Last active May 15, 2024 10:50
Instructions on how to install LAMP on Void Linux for easier PHP development

How to install LAMP in Void Linux

To install LAMP (Linux, Apache, MySQL/MariaDB, PHP) on Void Linux, follow these steps below.

NOTE: This has been prepared for ease of use in mind, not security. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead.

Install the things we need:

@ianmustafa
ianmustafa / 0-preface.md
Last active June 1, 2021 02:21
Tantangan PHP Indonesia for Student: Cari Bilangan Duplikat dalam List

Tantangan PHP Indonesia for Student: Cari Bilangan Duplikat dalam List

Sebelumnya, terima kasih kepada om Nur Hidayat (@hidayat365, Pojok Programmer) untuk tantangannya di grup Telegram PHP Indonesia for Students. Tantangan ini saya kerjakan karena iseng dan nungguin deploy app. 😂

Latar Belakang

Misalkan kita mempunyai list berisikan bilangan bulat antara 1 sampai n sebanyak n + 1 angka. Yang pasti kita ketahui adalah minimal ada satu bilangan yang duplikat dalam list tersebut.

Contohnya jika n = 3 maka bisa jadi isi List tersebut adalah 3, 1, 1, 3 atau bisa juga 1, 2, 3, 3.

@ianmustafa
ianmustafa / 0-preface.md
Last active June 1, 2021 02:21
Tantangan PHP Indonesia for Student: Algoritma Homing Pigeon

Tantangan PHP Indonesia for Student: Algoritma Homing Pigeon

Sebelumnya, terima kasih kepada om Nur Hidayat (@hidayat365, Pojok Programmer) untuk tantangannya di grup Telegram PHP Indonesia for Students. Tantangan ini kembali mengingatkan saya bahwa overthinking itu tidak perlu. 😂

Latar Belakang

Ada seorang raja kaya memiliki wilayah kekuasaan yang luas sedang berburu sendirian, namun sayang tak sengaja dia terpelesat dan kakinya terkilir. Untungnya dia membawa seekor merpati, sehingga dikirimlah merpati itu kembali ke istana untuk meminta bantuan.

@ianmustafa
ianmustafa / 0-prepare-your-linux-server.md
Last active June 1, 2021 02:17
Prepare your Linux Server

Prepare Your Linux Server

What Does This Really Do?

Basically we set up the timezone and locale, and only allow for SSH root login without password, by using SSH authentication key. We also add a basic Vim conviguration inside .vimrc by adding line numbers by default.

Then we update the repository and the system, and also add basic tools like nano, curl, tmux, even vim itself doesn't included by the system. zsh and git is prequisites for oh-my-zsh,