Skip to content

Instantly share code, notes, and snippets.

View KhunHtetzNaing's full-sized avatar

Khun Htetz Naing KhunHtetzNaing

View GitHub Profile
<?php
$yadisk = 'https://yadi.sk/i/d-8trVHpcT6qQA';
$json = file_get_contents("https://cloud-api.yandex.net/v1/disk/public/resources/?public_key={$yadisk}");
$json = json_decode($json);
echo 'File => ' . $json->file . 'Size => ' . sizeFilter($json->size) . 'Name => ' . $json->name;
function sizeFilter($bytes)
{
$label = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
@KhunHtetzNaing
KhunHtetzNaing / extract_url_from_gdrive.js
Created May 18, 2020 04:59
Extract stream url from google drive [2020]
function get_map() {
var str = document.head.innerHTML, //get html in current page
regex = /fmt_stream_map",(.*?)]/gm, //fetch map regex
m;
if ((m = regex.exec(str)) !== null) {
return m[1].replace(/"/g, ",");
}
return null;
}
if (document.body.textContent) {
get_all_video();
get_audio();
}
function parseURL(url) {
if (url == null) {
return null;
}
return url.replace(/amp;/g, '');
@KhunHtetzNaing
KhunHtetzNaing / index.html
Created October 7, 2019 16:05
Music Player 2.0
<div id="wrapper">
<div id="iphone">
<div id="camera">
<span></span>
<span></span>
</div>
<div id="screen">
<div id="content-wrap">
<div id="background"></div>
<div id="content">
@KhunHtetzNaing
KhunHtetzNaing / ExampleUsingCloneChecker
Created August 19, 2018 09:31
Example Using Clone Checker
String imei = "123456789012345";
CloneChecker cloneChecker = new CloneChecker(MainActivity.this, imei);
cloneChecker.onFinish(new CloneChecker.OnTaskCompleted() {
@Override
public void onTaskCompleted(boolean ogay) {
if (ogay) {
//This is original
} else {
//This is clone
}