Skip to content

Instantly share code, notes, and snippets.

View aditnanda's full-sized avatar
🏠
Working from home

Aditya Nanda Utama aditnanda

🏠
Working from home
View GitHub Profile
@aditnanda
aditnanda / coba-swiper.html
Created September 15, 2025 03:33
Untuk Gallery Slider
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Product Image Carousel (Main + Thumbnails)</title>
<!-- Swiper CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
<style>
:root {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text-to-Speech Sederhana (ID)</title>
<style>
body {
font-family: sans-serif;
display: flex;
@aditnanda
aditnanda / gist:f51a46fc01e7dbf63fe0ff6036f1759b
Created November 19, 2023 09:46
Halaman Depan Web RSD Ketapang
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>RSD Ketapang</title>
Download the files related to your operating system from the official website,
https://www.ioncube.com/loaders.php
Put the so file of the corresponding php version into /usr/local/ioncube/ and then add configuration content to the corresponding php version configuration file
Such as the so file of php8.1: /usr/local/ioncube/ioncube_loader_lin_8.1.so
The configuration file adds:
;ionCube
zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so
cd /www/server/php/74/src/ext/zip
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make && make install
extFile='/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/zip.so'
echo -e "extension = " ${extFile} >> /www/server/php/74/etc/php.ini
echo -e "extension = " ${extFile} >> /www/server/php/74/etc/php-cli.ini
/etc/init.d/php-fpm-74 reload
document.addEventListener("DOMContentLoaded", () => {
Livewire.hook('message.sent', (message, component) => {
console.log('start');
})
Livewire.hook('message.processed', (message, component) => {
console.log('stop');
})
});
{
"data": {
"pricelist": [
{
"product_code": "alfamart10",
"product_description": "Alfamart Voucher",
"product_nominal": "Voucher Alfamart Rp 10.000",
"product_details": "-",
"product_price": 10000,
"product_type": "voucher",
[REMOVE ALL PHP FIRST]
yum -y remove php*
[INSTALL LIBZIP 5]
sudo yum remove libzip5.x86_64
sudo yum install libzip5.x86_64
[INSTALL REPO]
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
@aditnanda
aditnanda / create_survey_json_ksbb.json
Last active June 9, 2022 06:00
Create Survey JSON KSBB
{
"name": "Membuat survei makanan",
"start": "2022-06-09",
"end": "2022-06-10",
"question": [{
"content": "Hai",
"type": "radio",
"options": ["Yes", "Oui"]
},
{
1. Untuk menghitung hari senin dalam 1 bulan
function total_sun($month,$year)
{
$sundays=0;
$total_days=cal_days_in_month(CAL_GREGORIAN, $month, $year);
for($i=1;$i<=$total_days;$i++)
if(date('N',strtotime($year.'-'.$month.'-'.$i))==7)
$sundays++;
return $sundays;
}