Find it here: https://github.com/bitemyapp/learnhaskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>test upload by chunk</title> | |
</head> | |
<body> | |
<input type="file" id="f" /> | |
<script src="script.js"></script> |
Uploads large files in multiple chunks. Also has the ability to resume if the upload is interrupted.
Typical usage:
- Send a POST request to
/upload
with the first chunk of the file and receive an upload id in return. - Repeatedly PATCH subsequent chunks using the upload id to identify the upload in progress and an offset representing the number of bytes transferred so far.
- After each chunk has been uploaded, the server returns a new offset representing the total amount transferred.
- After the last chunk commit the upload by passing its id to another endpoint such as
POST /upload/commit/:id
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import Subapp from './subapp/Root' | |
class BigApp extends Component { | |
render() { | |
return ( | |
<div> | |
<Subapp /> | |
<Subapp /> | |
<Subapp /> |
This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:
- Humans naturally resist change
- Your change is for the better
- Customers should just get used to it and stop complaining
There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# install dependencies: | |
# pip install base45 cbor2 (cwt - not used here) | |
import sys | |
import zlib | |
from base45 import b45decode | |
from cbor2 import loads |