Skip to content

Instantly share code, notes, and snippets.

View rayzalzero's full-sized avatar
:shipit:
Learning and Making

Naufal Riza Fatahillah rayzalzero

:shipit:
Learning and Making
View GitHub Profile
@rayzalzero
rayzalzero / install.sh
Created October 6, 2025 08:09
Install PHP 5.4.16 WIth Apache
#!/bin/bash
# ===========================================
# PHP 5.4.16 + Apache Complete Installation Script
# All-in-One version with all fixes included
# Tested on Ubuntu 20.04 / 22.04 / 24.04
# ===========================================
set -e # Exit on error
@rayzalzero
rayzalzero / selfcertip.md
Last active June 11, 2024 08:49
Set Self HTTPS IP

Untuk membuat sertifikat SSL dan kunci privat sendiri, Anda bisa menggunakan OpenSSL. Berikut adalah langkah-langkah untuk membuat sertifikat SSL self-signed untuk alamat IP. Namun, perlu dicatat bahwa sertifikat self-signed tidak dipercaya oleh browser atau klien lain tanpa konfigurasi tambahan untuk mempercayai sertifikat tersebut.

1. Install OpenSSL

Jika belum menginstal OpenSSL, instal terlebih dahulu. Contoh untuk distribusi berbasis Debian/Ubuntu:

sudo apt update
sudo apt install openssl
@rayzalzero
rayzalzero / index.php
Created December 22, 2023 09:19
PHP Encrypt Decrypt
<?php
$string = "secret";
$ciphering = "AES-256-CBC";
$encryption_key = "SecretKeySecretKeySecretKey";
$iv = substr($encryption_key, 0,16);
$encryption = openssl_encrypt($string, $ciphering, $encryption_key, 0, $iv);
var_dump($encryption);
@rayzalzero
rayzalzero / goth
Created November 23, 2023 07:15 — forked from novalagung/goth
golang test coverage html
#!/bin/bash
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
@rayzalzero
rayzalzero / artemis docker setup.txt
Last active June 11, 2024 08:52
Artemis Docker Setup
# Download script
wget https://gist.githubusercontent.com/vifito/36b00547251ab84225d986fd7d4f18f3/raw -O launch.sh
# Set exec permission
chmod +x launch.sh
# docker run
docker run -d --name amq \
-e AMQ_USER=admin -e AMQ_PASSWORD=admin \
-p 8161:8161 -p 61616:61616 \
@rayzalzero
rayzalzero / FlashSale.side
Created August 11, 2021 02:38
Flash Sale Exstentions
{
"id": "1b18391e-9028-4172-9536-b901b8b33113",
"version": "2.0",
"name": "Flash Sale",
"url": "https://my.lazada.co.id/",
"tests": [{
"id": "0ec83a18-2e45-44dd-a095-114f30c306be",
"name": "checkout",
"commands": [{
"id": "c4e1e756-c369-404f-a7f6-e5efe61a2cd1",
@rayzalzero
rayzalzero / pdf-splitter
Last active July 21, 2020 11:33
PDF slpliter by folder and rename it
from PyPDF2 import PdfFileWriter, PdfFileReader
from multiprocessing import Pool
import glob, sys, os
pdfs = glob.glob("*.pdf")
def process_pdfs(pdf):
inputFile = PdfFileReader(open(pdf, "rb"))
print("Processing %s"% pdf)
for i in range(inputFile.numPages):
@rayzalzero
rayzalzero / gorace.go
Created January 22, 2020 10:33
Go Race Condition
package main
//
import (
"fmt"
"sync"
)
//
// func main() {
// var a int
// m := new(sync.Mutex)
@rayzalzero
rayzalzero / gotime.go
Created September 17, 2019 04:35
Time Golang Default
package main
import (
"fmt"
"time"
)
var countryTz = map[string]string{
"Hungary": "Europe/Budapest",
"Egypt": "Africa/Cairo",
@rayzalzero
rayzalzero / config.php
Created February 17, 2018 04:53
config base codeigniter
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);