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 / subscribeList
Created August 25, 2022 03:31 — forked from LordHumphrey/subscribeList
2022-08-18 13:29:59
consatan /
Last active April 18, 2024 22:08 — forked from akpoff/
curl commands to query imap servers

curl commands to query imap servers

Based on

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');,$element,options);
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.
$a = new A();
$reflection = new \ReflectionClass($a);
$property = $reflection->getProperty('privateProperty');
$property->setValue($a, 'new-value');
echo $a->getPrivateProperty();
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