Skip to content

Instantly share code, notes, and snippets.

View axmad386's full-sized avatar
๐Ÿš€
working hard

Akhmad Salafudin axmad386

๐Ÿš€
working hard
View GitHub Profile
@axmad386
axmad386 / IAP_SETUP.md
Created January 15, 2026 02:47
In App Purchase Setup for Ios and Android

Real Credentials Setup & Integration Testing Guide

Status: Setup required before production deployment
Date: December 31, 2025
Version: 1.0


๐Ÿ“‹ Table of Contents

@axmad386
axmad386 / README.md
Last active September 3, 2025 09:57
Dynamic Subpath to Subdomain Proxy Mapping using Traefik and Cloudflare DNS

Directory Structure

|-- traefik
|---|-- docker.compose.yml
|---|-- domains
|---|---| main.yml
|---|---| foo.myapp.com.yml --> all generated subdomain will be here
|---|-- traefik.yml
@axmad386
axmad386 / drizzle-paginate.md
Created May 17, 2024 14:41
Fully Typed Drizzle ORM Dynamic Pagination Query

Pagination Helper

This is simple helper for dynamic pagination using drizzle-orm using basic limit offset. The result is fully typed.

import { db } from "../yourdbinstance";
import { sql } from "drizzle-orm";
import type { PgSelect } from "drizzle-orm/pg-core";

interface PaginateParam {
  limit: number;
 page: number;
@axmad386
axmad386 / reset_all_sequences.md
Created November 19, 2023 03:11
Postgre - Restore Auto Increment
CREATE OR REPLACE FUNCTION reset_all_sequences()
RETURNS VOID AS $$
DECLARE
    table_name_var TEXT;
    column_name TEXT;
BEGIN
    -- Loop through all tables in the database
    FOR table_name_var IN (SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE') LOOP
 -- Find the name of the sequence associated with the auto-increment column
@axmad386
axmad386 / wifi-connect.md
Created October 1, 2023 10:52
Connect wifi via terminal
  1. List all available wifi, you will see all available wifi with SSID and signal strength
nmcli dev wifi
  1. Connect to wifi:
nmcli dev wifi connect "SSID name" password "wifi password"
@axmad386
axmad386 / sites-available-domain.conf
Created September 21, 2023 04:07
Dynamic Subdomain Proxied to sub path with nginx
server {
listen 80;
server_name ~^(?<subdomain>.+)\.domain\.com domain.com;
# Location block for path that threated as assets
location ~* ^/(?<asset>image|css|js|fonts|@vite|node_modules)/(.*) {
proxy_pass http://127.0.0.1:3000/$asset/$2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
@axmad386
axmad386 / s3.md
Created August 1, 2023 08:29
Get S3 public url without s3 sdk
public getUrl(location: string): string {
  const {
    endpoint: configEndpoint,
    bucket,
    forcePathStyle,
    region,
  } = this.$config;
  const awsHost = region ? `s3.${region}.amazonaws.com` : "s3.amazonaws.com";
let endpoint = (configEndpoint as string) || `https:${awsHost}`;
@axmad386
axmad386 / Dockerfile
Created April 17, 2023 04:06
Dockerfile example for optimized nodejs production
FROM alpine:edge AS base
# install node
RUN apk add --no-cache nodejs npm tini
# set working directory
WORKDIR /var/www
#install pnpm
RUN npm install -g pnpm
# Set tini as entrypoint
ENTRYPOINT ["/sbin/tini", "--"]
# copy project file
@axmad386
axmad386 / tauri-deb.md
Created August 9, 2022 02:43
Persiapan Build Tauri Debian
  • Pastikan rust dan dependencynya sudah terinstall
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  • Jika keluar No package dbus-1 found install package tersebut
    sudo apt install libdbus-1-dev pkg-config
    
  • Jika keluar error terkait openssl install package berikut
@axmad386
axmad386 / init.vim.md
Last active August 25, 2022 05:55
Neovim Config

buat atau copy kode di bawah di file ~/.config/nvim/init.vim

lua require('plugins')

call plug#begin('~/.vim/plugged')

Plug 'preservim/nerdtree'

Plug 'junegunn/limelight.vim'