Skip to content

Instantly share code, notes, and snippets.

View consatan's full-sized avatar

Chopin Ngo consatan

  • Amoy, Fujian, China
View GitHub Profile
@consatan
consatan / subscribeList
Created August 25, 2022 03:31 — forked from LordHumphrey/subscribeList
2022-08-18 13:29:59
https://bpjc.xyz/api/v1/client/subscribe?token=2116e2631f6dff0926594b6ff6ec64a5&flag=shadowrocket
https://paste.gg/p/anonymous/4297d3372dcf4f4ea11b351e27b9e801/files/f5763822b2304577a2665aa98619f812/raw
https://suo.yt/ZF2DaFO
https://www.gyy.pw/api/v1/client/subscribe?token=c591df25ee623806fb752d1943c8dfA2
https://xn--mesv7f5toqlp.club/api/v1/client/subscribe?token=54f417aecc83d39e0a2f362779376eb5
https://suo.yt/E2xzY8f
https://subscribe.arapi.top/api/v1/client/subscribe?token=aed89f63c84d291145e55d3972db6be2
https://dy.72img.xyz/api/v1/client/subscribe?token=a268a7bfc948a09f87a1d94a525717df
https://paste.centos.org/view/raw/2182ec4d
https://www.rerongtuliao.com/api/v1/client/subscribe?token=091112454770a3d7c84adec11be973ef
@consatan
consatan / curl_imap_query_commands.md
Last active April 18, 2024 22:08 — forked from akpoff/curl_imap_query_commands.md
curl commands to query imap servers

curl commands to query imap servers

Based on https://busylog.net/telnet-imap-commands-note/

curl options

  • -k -- don't verify certificate (optional)
  • -n -- use .netrc for username and password (optional)
  • -X -- request to send to server
$.fn.select2.amd.define('select2/data/extended-ajax',['./ajax', './tags', '../utils', 'module', 'jquery'], function(AjaxAdapter, Tags, Utils, module, $) {
function ExtendedAjaxAdapter ($element,options) {
//we need explicitly process minimumInputLength value
//to decide should we use AjaxAdapter or return defaultResults,
//so it is impossible to use MinimumLength decorator here
this.minimumInputLength = options.get('minimumInputLength');
this.defaultResults = options.get('defaultResults');
ExtendedAjaxAdapter.__super__.constructor.call(this,$element,options);
}
@consatan
consatan / gist:009f505c436d58fd48a7c2ea414b0996
Created August 3, 2016 05:19 — forked from samsamm777/gist:7230159
PHP set private property value using reflection. This allows you to set a private property value from outside the object, great for PHPUnit testing.
<?php
$a = new A();
$reflection = new \ReflectionClass($a);
$property = $reflection->getProperty('privateProperty');
$property->setAccessible(true);
$property->setValue($a, 'new-value');
echo $a->getPrivateProperty();
//outputs:
<?php
class Item
{
private $cost = 100;
public function getTotal($discount = 7) {
return $this->cost *(100+$discount)/100;
}
}

Uploading Large Files

Note This is preliminary documentation and is subject to change as we evolve the OneDrive API.

OneDrive handles uploading large files by supporting the BITS protocol. BITS is a simple extension to HTTP that enables resumable file uploads to OneDrive.

Where the standard PUT method for uploading a file has a 100 MB limit, using