Skip to content

Instantly share code, notes, and snippets.

@perifer
perifer / switch_collation.php
Created December 20, 2010 15:32
Script for change the collation of a database's table (utf8)
#!/usr/bin/env php
<?php
/**
* Script for change the collation of a database's table's
*/
if ($argv[1] == '-h') {
echo "Usage:\n\tphp collation_switch.php sql-user sql-password sql-database target-collation target-character\nExample: php collation_switch.php USER PASS DATABASE utf8_swedish_ci utf8\n";
die();
}
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active March 13, 2024 18:17
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on