Skip to content

Instantly share code, notes, and snippets.

View habibimustafa's full-sized avatar

Habibi Mustafa habibimustafa

View GitHub Profile
@habibimustafa
habibimustafa / gist:5a7b51a9b44872cb34f67e4416be57a6
Created January 15, 2019 07:02 — forked from plasticbrain/gist:3887245
PHP: mime types (array format)
<?php
$mime_types = array(
'.3dm' => 'x-world/x-3dmf',
'.3dmf' => 'x-world/x-3dmf',
'.a' => 'application/octet-stream',
'.aab' => 'application/x-authorware-bin',
'.aam' => 'application/x-authorware-map',
'.aas' => 'application/x-authorware-seg',
'.abc' => 'text/vnd.abc',
'.acgi' => 'text/html',
@habibimustafa
habibimustafa / golang-tls.md
Created July 28, 2021 03:14 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@habibimustafa
habibimustafa / write-large-csv-concurrently.go
Last active January 20, 2022 08:11 — forked from carthegian/main.go
How to write large amount of data to CSV sequentially or concurrently
package main
import (
"encoding/csv"
"fmt"
"log"
"math/rand"
"os"
"strconv"
"sync"
@habibimustafa
habibimustafa / install-mariadb.sh
Created March 28, 2022 04:21 — forked from ihangoon/install-mariadb.sh
Install MariaDB 10.4 on WSL(ubuntu 18.04)
# 하기 페이지를 참고하여 사용 중인 Linux 버전에 맞는 것을 설치한다.
# https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=bionic--ubuntu_bionic&mirror=hosting90&version=10.4
# ubuntu 18.04에서의 설치는 다음과 같다.
sudo apt-get install software-properties-common
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://suro.ubaya.ac.id/mariadb/repo/10.4/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server
@habibimustafa
habibimustafa / Vagrantfile
Created March 28, 2022 04:21 — forked from rjz/Vagrantfile
Vagrant with MariaDB provisioned (ansible)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.