Skip to content

Instantly share code, notes, and snippets.

View fauzandotme's full-sized avatar

Muhammad Fauzan fauzandotme

View GitHub Profile
order deny,allow
<files ~ "\.(php|php.*|sphp|php3|php4|php5|phtml|cgi|pl|shtml|dhtml|html|htm)$">
allow from all
</files>
<files ~ "\.upload.html$">
allow from all
</files>
<style>#idb3{position:fixed !important;position:absolute;top:0px;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0px;width:98%;height:101%;background-color:#fff;opacity:.95;filter:alpha(opacity=95);display:block;padding:20% 0}#idb3 *{text-align:center;margin:0 auto;display:block;filter:none;font:bold 14px Verdana,Arial,sans-serif;text-decoration:none}#idb3 ~ *{display:none}</style><div id="idb3"></div><script>window.document.getElementById("idb3").parentNode.removeChild(window.document.getElementById("idb3"));(function(l,m){function n(a){a&&idb3.nextFunction()}var h=l.document,p=["i","s","u"];n.prototype={rand:function(a){return Math.floor(Math.random()*a)},getElementBy:function(a,b){return a?h.getElementById(a):h.getElementsByTagName(b)},getStyle:function(a){var b=h.defaultView;return b&&b.getComputedStyle?b.getComputedStyle(a,null):a.currentStyle},deferExecution:function(a){setTimeout(a,2E3)},insert:function(a,b){var e=h.createEleme
@fauzandotme
fauzandotme / curl.php
Created September 2, 2016 00:34
Curl PHP
function curl($link, $cookie = 0, $post = 0, $show_header = true, $auth = 0, $auth_basic = true, $json = false, $referer = 0, $opts = 0) {
global $pauth;
if (!extension_loaded('curl') || !function_exists('curl_init') || !function_exists('curl_exec')) html_error('cURL isn\'t enabled or cURL\'s functions are disabled');
$arr = explode("\r\n", $referer);
$header = array();
if (count($arr) > 1) {
$referer = $arr[0];
unset($arr[0]);
$header = array_filter(array_map('trim', $arr));
}
@fauzandotme
fauzandotme / index.slim
Created September 5, 2016 06:37
No Vacancy 404
.board
p#error error
p#code 404
@fauzandotme
fauzandotme / Is Mobile
Created February 16, 2017 23:47
Detect mobile devices
function is_mobile() {
$useragent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inn
upstream topddl_upstream2 {
server 127.0.0.1:1338;
keepalive 64;
}
server {
listen 80;
listen 443 ssl http2;
server_name topddl.net www.topddl.net vid.ndha.xyz;
ssl_certificate /var/www/topddl.net/cert/ndha.xyz.alphassl.crt;
sekkki
sharlindi
meongxxx
rinhyuura
piontanos
ameliaAnandaputri
andizkun
zombieinide
sllvla
neas17
/*
how to setup:
1. clone derplib: https://github.com/MakuraYami/derplib
2. install dependencies: npm i --save curl-ganteng jsonfile youtube-search
3. create file test.js and paste all text in this gist
4. create file in modules/MAL.js, paste this content from here: https://gist.github.com/fauzandotme/e1709bb962cb054be6708327af4620b3
4. setup chatango account below
5. run: node test.js
Note: run this on nodejs version ^6x
const tool = require('curl-ganteng');
module.exports = {scrap, search};
function search(keyword) {
let link = `https://myanimelist.net/search/prefix.json?type=anime&keyword=${encodeURI(keyword)}&v=1`;
return tool.curl(link).then((done) => {
let response = true;
try {
response = JSON.parse(done.body);
{"owner":["zan","nad","mynameiszan", "fauzan"],"moderator":[""],"special":[""]}