Skip to content

Instantly share code, notes, and snippets.

View xcoders-hub's full-sized avatar
🏠
Working from home

xcoders xcoders-hub

🏠
Working from home
View GitHub Profile
@xcoders-hub
xcoders-hub / remote-upload-with-proogressbar.php
Created January 4, 2021 07:28 — forked from TheCoderRaman/remote-upload-with-proogressbar.php
Copy a online file using the php remote script with progressbar
<?php
/*
* Remote File Copy PHP Script 2.0.0
*
* Copyright 2012, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
@xcoders-hub
xcoders-hub / download_file.php
Created January 4, 2021 06:47 — forked from pigfly88/download_file.php
Download remote file straight to client
function downloadFile($fileUrl)
{
$isRemoteFile = null === parse_url($fileUrl, PHP_URL_HOST) ? false : true;
$fileName = $isRemoteFile ? ltrim(parse_url($fileUrl, PHP_URL_PATH), '/') : pathinfo($fileUrl, PATHINFO_BASENAME);
// 获取文件大小
if ($isRemoteFile) {
$ch = curl_init($fileUrl);
$options = [
@xcoders-hub
xcoders-hub / file_download.php
Created January 4, 2021 06:46 — forked from Vijaysinh/file_download.php
Download Files from Remote Server DB
<?PHP
error_reporting(E_ALL);
ini_set('display_errors',1);
get_attachments();
if(isset($_GET['id']) && !empty($_GET['id'])){
$id = $_GET['id'];
$fileName = $_GET['file'];
@xcoders-hub
xcoders-hub / unfollow.js
Created December 25, 2019 17:46 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
(() => {
const followButtonQuery = '[data-testid$="-unfollow"]';
const confirmButtonQuery = '[data-testid="confirmationSheetConfirm"]';
const sleep = ({ seconds }) =>