Skip to content

Instantly share code, notes, and snippets.

View bagusindrayana's full-sized avatar

Bagus Indrayana bagusindrayana

View GitHub Profile
#include <Wire.h> // Untuk komunikasi I2C
#include <Adafruit_GFX.h> // Library grafis
#include <Adafruit_SSD1306.h> // Library driver OLED SSD1306
// --- Konfigurasi Pin ---
#define MQ7_PIN 3 // Pin Analog (A3)
#define SDA_PIN 8 // Pin I2C SDA (GPIO8)
#define SCL_PIN 9 // Pin I2C SCL (GPIO9)
// --- Konfigurasi Layar ---
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <LittleFS.h>
// --- konfigurasi video / display
#define VIDEO_WIDTH 128
#define VIDEO_HEIGHT 64
#define VIDEO_FPS 24
#define FRAME_SIZE 1024 // harus sesuai format file video
@bagusindrayana
bagusindrayana / 3_axis_3d_cube.ino
Created October 26, 2025 05:58
3 axis control 3D cube
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// Pin potentiometer
{
"php": [
{
"version": "8.3.4",
"url": "https://windows.php.net/downloads/releases/php-8.4.10-Win32-vs17-x64.zip",
"os": "windows"
},
{
"version": "8.2.17",
"url": "https://windows.php.net/downloads/releases/php-8.2.29-Win32-vs16-x64.zip",
<?php
// Error reporting for debugging (disable in production)
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Allow CORS (modify as needed)
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
@bagusindrayana
bagusindrayana / usage.php
Last active December 22, 2024 06:30
system resource usage
<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With");
echo json_encode(getSystemInfo());
// Main function to get all system info
acehprov.go.id
baliprov.go.id
bantenprov.go.id
bengkuluprov.go.id
jogjaprov.go.id
jakarta.go.id
gorontaloprov.go.id
jambiprov.go.id
jabarprov.go.id
jatengprov.go.id
@bagusindrayana
bagusindrayana / get_coastline.py
Created April 12, 2024 13:21
get border line from multi regions and keep them separate.
# original by Pieter : https://gis.stackexchange.com/a/479885/241817
import math
import geopandas as gpd
from matplotlib import pyplot as plt
import matplotlib.colors as mcolors
import shapely
# Prepare (test) data.
poly1 = shapely.box(2, 0, 4, 3)
poly2 = shapely.box(0, 1, 2, 2)
@bagusindrayana
bagusindrayana / batas_wilayah_kota_indonesia.geojson
Created April 12, 2024 09:44
batas wilayah kota indonesia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.