Skip to content

Instantly share code, notes, and snippets.

View mzaksana's full-sized avatar
:atom:
Mars Exploration

Muammar Zikri Aksana mzaksana

:atom:
Mars Exploration
View GitHub Profile
@mzaksana
mzaksana / provider.tsx
Created April 13, 2026 08:59
Example provider
import { use } from "react";
export function CampaignPageProvider({
initial,
children,
}: CampaignPageProviderProps) {
const [loadCampaign, setLoadCampaign] = useState(false);
const [loadSubmission, setLoadSubmission] = useState(false);
const [loadMoreCampaigns, setLoadMoreCampaigns] = useState(false);
@mzaksana
mzaksana / Makefile
Last active April 11, 2026 14:19
Mysql Lab
#!/usr/bin/make
.PHONY = all clean
BASH := $(shell which bash)
up:
bash -c 'docker-compose -p mysql-server -f docker-compose.yml up -d --build'
down:
🌞 Morning 4 commits ███▏░░░░░░░░░░░░░░░░░ 15.4%
🌆 Daytime 11 commits ████████▉░░░░░░░░░░░░ 42.3%
🌃 Evening 11 commits ████████▉░░░░░░░░░░░░ 42.3%
🌙 Night 0 commits ░░░░░░░░░░░░░░░░░░░░░ 0.0%
@mzaksana
mzaksana / total-n-newest-files.sh
Created September 12, 2025 21:16
Total & Newest Files
watch -n 2 '
echo "Total files: $(find src -type f | wc -l)"
echo
echo "Newest 10 files:"
find src -type f -exec stat -f "%Sm %z %N" {} + | sort -r | head -n 10
'
@mzaksana
mzaksana / tmux-cheatsheet.markdown
Created November 27, 2021 08:52 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mzaksana
mzaksana / kaldi_online.sh
Created August 15, 2021 17:30
Example to online ASR using kaldi model
# Prepare kaldi exp to vosk model format. ! Unnecessary
# https://gist.github.com/mzaksana/83f673a2e0460f88c671c4f7f94dc0bb
online2-tcp-nnet3-decode-faster \
--verbose=1 \
--endpoint.silence-phones=1:2:3:4:5 \
--mfcc-config=model-android/conf/mfcc.conf \
--ivector-extraction-config=model-android/conf/ivector_extractor.conf \
model-android/am/final.mdl \
model-android/graph/HCLG.fst \
# Script to genarate vosk api model from kaldi exp
# by mzaksana
# Path for model
model_online="/path-user/chain-online"
graph="/path-user/tree/graph"
lang="/path-user/data/lang"
@mzaksana
mzaksana / UploaderForGoogleDrive.js
Created January 4, 2021 13:28 — forked from DrPaulBrewer/UploaderForGoogleDrive.js
Upload Browser Blobs to Files in Google Drive API v3
// upload.js, from https://github.com/googledrive/cors-upload-sample
// Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain
// License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
//
// Implements Resumable Upload for Google Drive as described by
// https://developers.google.com/drive/v3/web/resumable-upload
//
// Modified by Paul Brewer, Economic and Financial Technology Consulting LLC
// Nov. 1 2017
// 1. use Google Drive API V3 instead of V2
#!/bin/bash -v
# backing up a vm
cd /media/tim/WD6/
base="/home/tim/VirtualBox VMs"
src=win10-2018
mv $src.tar.lz4 $src.tar.lz4.old
@mzaksana
mzaksana / svg2tex.sh
Created August 8, 2020 11:53
Convert svg file to tex using inkscape cli
#!/bin/bash
# Just set of command for generate tex from pdf using inkscape
# depedency :
# - inkscape
# - sed
# some editor/compiler cant find generated pdf file with realtive path by inkscape
# sed using for replace realtive path for *.pdf with absolute path in *.pdf_tex
#
# script only work with single case