Skip to content

Instantly share code, notes, and snippets.

View aznoisib's full-sized avatar

aznoisib aznoisib

View GitHub Profile
@aznoisib
aznoisib / build_android_app_on_termux.md
Created December 11, 2023 06:56 — forked from tmatz/build_android_app_on_termux.md
Build android app on termux

Build android app on termux

1. install termux

install termux from F-Droid.

2. setup termux

apt update
@aznoisib
aznoisib / ConvertMS.js
Created February 19, 2021 17:06 — forked from flangofas/ConvertMS.js
JS: Convert Milliseconds to days? minutes? seconds? or all!
function convertMiliseconds(miliseconds, format) {
var days, hours, minutes, seconds, total_hours, total_minutes, total_seconds;
total_seconds = parseInt(Math.floor(miliseconds / 1000));
total_minutes = parseInt(Math.floor(total_seconds / 60));
total_hours = parseInt(Math.floor(total_minutes / 60));
days = parseInt(Math.floor(total_hours / 24));
seconds = parseInt(total_seconds % 60);
minutes = parseInt(total_minutes % 60);
@aznoisib
aznoisib / cyborg4.3.1.min.css
Created February 12, 2021 12:47
Cyborg 4.3.1 bootwatch
/*!
* Bootswatch v4.3.1
* Homepage: https://bootswatch.com
* Copyright 2012-2019 Thomas Park
* Licensed under MIT
* Based on Bootstrap
*//*!
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
@aznoisib
aznoisib / cek.md
Last active February 25, 2021 13:41
codecy.blogspot.com paginate
@aznoisib
aznoisib / cvs2images.js
Created January 31, 2021 17:20
screenshoot div js
/**
* covert canvas to image
* and save the image file
*/
var Canvas2Image = function() {
// check if support sth.
var $support = function() {
var canvas = document.createElement('canvas'),
@aznoisib
aznoisib / curl_progress.php
Created January 2, 2021 01:28 — forked from bdunogier/curl_progress.php
PHP/cURL download progress monitoring
<?php
file_put_contents( 'progress.txt', '' );
$targetFile = fopen( 'testfile.iso', 'w' );
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_NOPROGRESS, false );
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' );
curl_setopt( $ch, CURLOPT_FILE, $targetFile );
@aznoisib
aznoisib / curl_progress.php
Created January 2, 2021 01:21 — forked from stuudmuffin/curl_progress.php
PHP/cURL download progress monitoring
<?php
//output buffer
ob_start();
//create javascript progress bar
echo '<html><head>
<script type="text/javascript">
function updateProgress(percentage) {
document.getElementById(\'progress\').value = percentage;
}
@aznoisib
aznoisib / downloader.php
Created January 1, 2021 21:09 — forked from ndunks/downloader.php
PHP Curl Downloader with resume support
<?php
set_time_limit(0);
ignore_user_abort(true);
$url = "http://web.shit/backup.zip";
$ch = curl_init($url);
$to_file = 'web.zip';
$opt = array();
if(is_file($to_file))
{
@aznoisib
aznoisib / HttpRequest.java
Created August 15, 2020 01:53 — forked from amitaymolko/HttpRequest.java
Simple HttpURLConnection wrapper class
package com.amitaymolko.network;
import java.util.HashMap;
/**
* Created by amitaymolko on 2/16/16.
*/
public class HttpRequest {