- [Progressive Web Apps - MDN][2] (the best starting point)
- [Service Workers API - MDN][3]
- Progressive Web Apps - Google Developers
- [Workbox - GDG][4]
- [Service Workers - GDG][5]
object Algebra { | |
// Build up increasingly complex algebras | |
trait Magma[T] { | |
def add(x : T, y : T) : T | |
} | |
trait Monoid[T] extends Magma[T] { | |
def zero : T | |
} |
<?php | |
class Extract { | |
const FFMPEG_PATH = '/usr/bin/ffmpeg'; | |
public function exec($psSource, $psDest) { | |
$aOutput = []; | |
$aError = null; | |
$sCommand = sprintf("%s -i %s -vframes 1 %s 2>&1", self::FFMPEG_PATH, $psSource, $psDest); | |
echo 'Executing: ' . $sCommand; |
<?php | |
/** | |
* Format an amount of bytes using a SI metric conversion | |
* | |
* Note: 1024 to express the format in KiB, MiB | |
* | |
* @author Alfredo Torre <alfredo@dubishere.com> | |
* @see https://en.wikipedia.org/wiki/Kibibyte | |
* @param string/int $pBytes | |
* @param int $piPrecision |
# From the official ffmpeg docs
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libvorbis-dev pkg-config texinfo zlib1g-dev \
yasm libx264-dev libmp3lame-dev libvpx-dev libfdk-aac-dev
SELECT | |
SUBSTRING_INDEX(number, '.', 1) AS FIRST_INT, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(number, '.', 2), '.', -1) AS SECOND_INT, | |
SUBSTRING_INDEX(number, '.', -1) AS THIRD_INT, | |
number as VERSION, | |
description as TITLE | |
FROM _version | |
ORDER BY | |
LENGTH(SUBSTRING_INDEX(number, '.', 1)) DESC, | |
SUBSTRING_INDEX(number, '.', 1) DESC, |
On October 31st 2008, the programmer/programmers known as Satoshi Nakamoto published this paper through a metzdowd.com cryptography mailing list that describes the Bitcoin currency and solves the problem of double spending so as to prevent the currency from being copied.
In January of 2009, he started mining, creating what is known as the “genesis block.” Bitcoin v0.1 was released six days later. By year-end, over 32,000 blocks had been added to this original block, producing a total of 1,624,250 bitcoins. Since all transactions are public on the blockchain, we know that only a quarter of those bitcoins have ever changed hands, leading some to speculate that Satoshi could be sitting on a stash of roughly one million bitcoins, worth ~$120 million at today’s exchange rate. Who is Satoshi Nakamoto
When the server needs to send large amount of data, chunked encoding is used by the server because it did not exactly know how big (length) the data is going to be. In HTTP terms, when server sends response Content-Length header is omitted by the server. Instead server writes the length of current chunk in hexadecimal format followed by \r\n and then chunk, followed by \r\n (Content begins with chunk size in hex followed by chunk)
This feature can be used for progressive rendering; however the server needs to flush the data as much as possible so that client can render content progressively (in case of html,css etc)
This feature is often used when server pushes data to the client in large amounts - usually in giga bytes.