Skip to content

Instantly share code, notes, and snippets.

View luqmansungkar's full-sized avatar

Luqman Sungkar luqmansungkar

View GitHub Profile
@luqmansungkar
luqmansungkar / restore-ibd-frm.md
Created April 12, 2020 05:58
How to restore mysql database from .ibd and .frm file

Have you ever stuck in a condition where you have to restore your mysql database from only an *.frm and *.ibd files? I have.

So what happen is somehow our mysql service is going down and can not be restarted. I try many things to no avail and getting tired of it.

And then I came across this page https://dev.mysql.com/doc/mysql-enterprise-backup/3.11/en/partial.restoring.single.html. I think probably I can just copy the *.frm and *.ibd file, wipe the current mysql data, reset the mysql, and restore those two files. Easy.

So I stupidly remove /var/lib/mysql/[schema_name], and also /var/lib/mysql/ib* file. Restart the mysql, and it start normally. Finally!

How Being a Freak about Alert and Monitoring Saves Tokopedia from Millions of Dollars in Downtime

  • impact downtime bisa besar, 1 menit pun besar

1

  • monitoring
    • collect. Define what data do you want to collect. Maybe tps, response time. Method can be push or pull
    • process. How you use the metric data that you collect. Maybe parse the log, etc
    • observatibility. Give you a quick glance at your system.
  • monitoring from different perspectives

How We Secure 90 Million Active Users Data

1

  • data privacy framework
    • identify. apa yang ingin dilindungi
    • govern. Dari organisasi gimana mau ngatur data nya
    • control. Pengaturan hak akses, dll
    • communicate.
  • protect. Teknis gimana ngamanin nya

Engineering Productivity 101

  • Find bug as early as possible. As the stage progressing, the cost will increase, because more party will be involved 1

  • Manual testing is not working:

    • costly
    • error prone
  • need large workforce

Memilih Madzhab Fiqih

Pengertian Madzhab

  • Secara bahasa artinya tempat untuk lewat atau jalan. Dikaitkan dengan Fiqih karena para ulama menggunakan jalan/metode tertentu untuk sampai pada hukum syar'i
  • Secara istilah, "Apa yang diambil oleh mujtahid dari hukum syar'i yang bersifat furu' ijtihadi, yang dihasilkan dari dalil-dalil yang bersifat dzann(asumtif)"
  • Maksudnya adalah seorang ulama mujtahid memiliki atau memilih satu metode dalam berijtihad, dan metode yang digunakan inilah yang disebut sebagai madzhabnya. Metode ini kemudian juga diajarkan kepada murid-murid dan ditulis dalam kitab-kitab sehingga tersebar, tersusun, dan terjaga hingga saat ini

Mengikuti Madzhab

  • Cukup umum bagi nama ulama jika diakhiri dengan nisbat kepada madzhab tertentu. Misal, Imam Nawawi As-Syafi'i, atau Ibnu Qudamah Al-Maqdisi Al-Hambali
  • Nisbat tersebut menunjukkan bahwa mereka mengikuti madzhab tersebut dalam berijtihad
@luqmansungkar
luqmansungkar / sbig-api-docs.md
Last active January 17, 2021 02:08
Slightly-big Flip API Documentation

Slightly-big Flip API Documentation

Authentication

We are using Basic Authentication by including Authorization header in each of your request. You should include your secret key like a usual basic auth request, and use the secret key as the username.

Your secret key is: HyzioY7LP6ZoO7nTYKbG8O4ISkyWnX1JvAEVAhtWKZumooCzqp41

General

@luqmansungkar
luqmansungkar / liqo-170917.md
Last active August 28, 2018 08:01
Materi tausyiah liqo pekanan, tanggal 17 September 2017 tentang menjaga diri dari najis

Menjaga Diri dari Najis

"...Sungguh, Allah menyukai orang yang tobat dan menyukai orang yang menyucikan diri" Al-Baqarah-222

Macam-macam sumber najis

  • Bangkai
  • Darah
  • Daging babi
  • Muntah
  • Kencing
<?php
$data = isset($_POST['data']) ? $_POST['data'] : null;
$token = isset($_POST['token']) ? $_POST['token'] : null;
if($token === 'the_token_you_get_from_big_flip_dashboard'){
$decoded_data = json_decode($data);
print_r($decoded_data);
//will print:
/**