Skip to content

Instantly share code, notes, and snippets.

View mohamad-supangat's full-sized avatar
:shipit:
Working from home

Mohmad Supangat mohamad-supangat

:shipit:
Working from home
View GitHub Profile
@mohamad-supangat
mohamad-supangat / example.nginx
Created February 27, 2025 08:06 — forked from gsanders5/example.nginx
Automatic nginx virtual subdomains with sub-folders or sub-directories
# Automatic nginx virtual subdomains with sub-folders or sub-directories
#
# Since the original source where I found this code is now offline, I have decided to mirror it here.
# All credit goes to: http://web.archive.org/web/20150307193208/http://www.messaliberty.com/2010/10/automatic-nginx-virtual-subdomains-with-sub-folders-or-sub-directories
#
# Description: In my web root directory I wanted create a folder called photos, and another called
# music using a sftp program. Without manually going back to the config file or to the shell I like to
# be able to access them at photos.nginxdomain.com and music.nginxdomain.com. That is what this config does.
# Redirect visitors from http://nginxdomain.com/ to http://www.nginxdomain.com/

How to run laravel Schedule and Queue with Supervisor

Create supervisor config file for laravel

nano /etc/supervisor/conf.d/laravel-worker.conf

laravel-worker.conf

@mohamad-supangat
mohamad-supangat / parse-nginx-log.js
Last active January 20, 2025 04:11
Parse Nginx Log.js
import fs from "node:fs";
fs.readFile("./nginx_log.txt", "utf8", (err, data) => {
const lines = data.split(/\r?\n/);
let reportsIP = {};
let reportsDate = {};
for (const line of lines) {
if (line) {
const ipAdress = line.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)[0];

Cara hotspotan kuota unlimited semua provider di android ROOTED DEVICE ONLY siapa sangka android juga bisa melakukannya? ya karena android sendiri itu ekosistemnya linux jadi kita bisa eksekusi program layaknya linux itu sendiri oke caranya, buka aplikasi terminal apa aja, atau bisa pakai yang lebih familiar yaitu termux, ketik "su" lalu grant rootnya setelah grant berhasil masukan ini su -c sysctl -w net.ipv4.ip_default_ttl=65 su -c sysctl -w net.ipv6.conf.all.hop_limit=65

@mohamad-supangat
mohamad-supangat / reset.bat
Created October 21, 2024 04:27
Reset Navicat
@echo off
echo Deleting HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update
reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update /f
echo Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration[version and language]
for /f "tokens=*" %%i in ('REG QUERY "HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium" /s ^| findstr /L "Registration"') do (
reg delete "%%i" /va /f
)
@mohamad-supangat
mohamad-supangat / _Notes.md
Created August 21, 2024 03:48 — forked from bassamsdata/_Notes.md
MiniFiles Git integration

Below is a code for Minifiles Git integration code snippet.

How to use it

Just insert the code below into this function in your Minifiles config:

config = function()
-- add the git code here
end
@mohamad-supangat
mohamad-supangat / printjurnal.php
Last active July 26, 2024 06:42
printjurnal MTS
<?php
ob_start();
require("../../config/database.php");
require("../../config/function.php");
require("../../config/functions.crud.php");
session_start();
// if (!isset($_SESSION['id_user'])) {
// die('Anda tidak diijinkan mengakses langsung');
// }
@mohamad-supangat
mohamad-supangat / .gitlab-ci.yml
Created May 6, 2024 06:26 — forked from amitavroy/.gitlab-ci.yml
Continuous Integration with Gitlab
stages:
- test
# Variables: these have to match
# the .env.example credentials in your Laravel app
# use the default homestead/secret combination, since
# that database gets created in the edbizarro/gitlab-ci-pipeline-php:7.1
# docker image.
variables:
MYSQL_ROOT_PASSWORD: root
@mohamad-supangat
mohamad-supangat / sales_quotation.xml
Last active March 27, 2024 02:35
odoo report xml
<div class="page" style="margin: 0px !important; padding: 0px !important; font-size:13px!important; color: black!important">
<div class="oe_structure" />
<div class="row justify-content-end">
<div>
<div class="d-inline" t-if="env.context.get('proforma', False) or is_pro_forma">
<h4 class="border border-dark rounded p-2">Proforma Invoice</h4>
</div>
<!--INVOICE DP-->
@mohamad-supangat
mohamad-supangat / auto_battery_100.sh
Created January 5, 2024 06:33
Auto Change Android Battery level to 100 every 3 second
#!/system/bin/sh
while true
do
dumpsys battery set level 100
sleep 5
done