Skip to content

Instantly share code, notes, and snippets.

@mesbahulalam
mesbahulalam / JSKeyCodes
Created August 2, 2020 08:12 — forked from tylerbuchea/JSKeyCodes
List of JavaScript key codes.
backspace 8
tab 9
enter 13
shift 16
ctrl 17
alt 18
pause/break 19
caps lock 20
escape 27
page up 33
@mesbahulalam
mesbahulalam / php-ftp-download-auto-resume.php
Created July 22, 2020 16:31 — forked from cballou/php-ftp-download-auto-resume.php
Download a file via FTP with auto-resume functionality in case of any disconnects.
<?php
/**
* Copyright (C) <2012> <Corey Ballou>
* @author Corey Ballou <http://www.craftblue.com>
* @license MIT License
*/
/**
* Handles FTP download of a remote file and stores it in a local file.
*
@mesbahulalam
mesbahulalam / resumable-download.php
Created July 21, 2020 12:39 — forked from kosinix/resumable-download.php
PHP - resumable download
<?php
class ResumeDownload {
private $file;
private $name;
private $boundary;
private $delay = 0;
private $size = 0;
function __construct($file, $delay = 0) {
if (! is_file($file)) {