Skip to content

Instantly share code, notes, and snippets.

View ndunks's full-sized avatar
💭
I'm programer and I have wife 😄

Mochamad Arifin ndunks

💭
I'm programer and I have wife 😄
View GitHub Profile
@ndunks
ndunks / modem-indihome-zte
Created March 21, 2018 20:28
Default login telnet/webuser modem indihome ZTE F609
webuser
=======
admin:admin
admin:Telkomdso123
user:user
telnet
======
root:Zte521

Manual Mode

certbot certonly --manual --preferred-challenges dns-01 --manual-public-ip-logging-ok \
-m user@gmail.com -d '*.domain'

SSL RENEW

certbot renew
// IF using cookie, make sure the domain was added in "Cookie" -> Whitelist Domain
// Walk cookie
const cookie = pm.cookies.jar();
cookie.getAll(pm.request.url, (v1, cookies) => {
for (let v of cookies.map()) {
if (v.name.length > 32 && v.name.match(/[0-9a-f]/i)) {
pm.request.body.urlencoded.add({
key: v.name,
value: v.value
@ndunks
ndunks / downloader.php
Created October 27, 2017 05:02
PHP Curl Downloader with resume support
<?php
set_time_limit(0);
ignore_user_abort(true);
$url = "http://web.shit/backup.zip";
$ch = curl_init($url);
$to_file = 'web.zip';
$opt = array();
if(is_file($to_file))
{
-- show all database
SELECT GROUP_CONCAT(SCHEMA_NAME) FROM information_schema.SCHEMATA
-- Show all table on current DB
SELECT GROUP_CONCAT(TABLE_NAME) FROM information_schema.TABLES where TABLE_SCHEMA = database()
-- Show all COLUMNS
SELECT GROUP_CONCAT(COLUMN_NAME) FROM information_schema.COLUMNS where TABLE_SCHEMA = database() and TABLE_NAME = ''
-- Use cast to string if fail
SELECT GROUP_CONCAT(CAST(COLUMN_NAME as CHAR)) FROM information_schema.COLUMNS where TABLE_SCHEMA = database() and TABLE_NAME = ''
@ndunks
ndunks / docker-compose.yml
Last active September 5, 2021 15:00
GitLab Omnibus Docker Compose with ZOHO Mail
version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: unless-stopped
container_name: gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.local'
puma['worker_processes'] = 2
@ndunks
ndunks / package.json
Last active November 5, 2021 23:45
Wordpress 5.8 Typescript Webpack Config - Gutenberg Blocks Development Environment
{
"name": "wordpress-typescript-sample",
"version": "1.0.0",
"main": "build/index.js",
"scripts": {
"start": "wp-scripts start"
},
"dependencies": {
"@wordpress/blocks": "^11.1.2"
},
# Enable testing community repo
apk install containerd kubeadm kubectl cni-plugins
service machine-id start
rc-update add machine-id boot
kubeadm init --pod-network-cidr=10.244.0.0/16 --control-plane-endpoint=kubemaster.local
# I use Alpine v3.15, need downgrade cni-plugins on v3.14 that have /usr/libexec/flannel
apk add cni-plugins=0.9.1-r2
@ndunks
ndunks / vpn-route.bat
Last active January 6, 2022 03:36
VPN Auto Route Specific IP on Windows
rem Open VPN Connection Properties -> Network -> Ipv4 -> Advanced -> [Uncheck] Use default gateway
rem Create Basic Task Scheduler on specific Event Log to run this cmd
rem Network Profile Operational, NetworkProfiile, eventID:10001 or 10000 (cek on Even viewer to make sure)
route ADD 192.168.4.0 MASK 255.255.255.0 192.168.5.1
#!/bin/bash
DELAY=0.3
STEP=0
ART_CHARS="—\\—//"
while true; do
IDX=$(( $STEP % 4 ))
CHAR=${ART_CHARS:$IDX:1}
echo -e -n "\r"
printf "$CHAR %.0s" {1..50}
STEP=$(( $STEP + 1 ))