Skip to content

Instantly share code, notes, and snippets.

View therusetiawan's full-sized avatar
💭
Hello World!

Heru Setiawan therusetiawan

💭
Hello World!
View GitHub Profile
@therusetiawan
therusetiawan / status.html
Last active June 1, 2025 07:01
Cek Kuota User Hotspot
# Script untuk mengecek kuota hotspot yang telah terpakai dengan memanfaatkan halaman status hotspot
# Dapatkan WINBOT KEY dan MIKROTIK ID di layanan https://mikrotik-winbot.com
<tr>
<td align="right">cek kuota:</td>
<td>
<a href="https://api.mikrotik-winbot.com/api/v1/hotspot/usage/{{WINBOT KEY}}/{{MIKROTIK ID}}/$(username)/">
Klik Di Sini
</a>
</td>
@therusetiawan
therusetiawan / LogMonitor
Last active June 1, 2025 07:01
Mikrotik Sending Log with WhatsApp Bot
# This script is inspired by https://forum.mikrotik.com/viewtopic.php?t=151953
# BEGIN SETUP Edit Here
:local myserver ([/system identity get name])
:local scheduleName "LogMonitor"
:local key "{{KEY FROM WINBOT}}"
:local NoHP "628123xxxxxxx"
:local startBuf [:toarray [/log find message~"keyword 1" || message~"keyword 2" ]]
:local removeThese {"remove keyword"}
@therusetiawan
therusetiawan / cleanup.sh
Created May 15, 2019 04:32 — forked from yusufsyaifudin/cleanup.sh
Cleaning up docker to reclaim disk space
#!/bin/bash
# based on https://lebkowski.name/docker-volumes/
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
docker volume ls -qf dangling=true | xargs -r docker volume rm
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
@therusetiawan
therusetiawan / README-Template.md
Created November 15, 2018 07:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@therusetiawan
therusetiawan / postgres-docker-config.sh
Last active February 1, 2019 09:40
Run postgres on docker host, connect from docker containers
#!/bin/bash
################################################################################
# Rather than run postgres in its own container, we want to run it on
# the (Ubuntu) host and allow:
#
# + peer connections on the host
# + local md5 connections from any docker container
#
# THIS IS COPY/PASTED FROM COMMAND LINE INPUT AND IS UNTESTED AS A SINGLE SCRIPT
################################################################################