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
//save-file action | |
import { CALL_API } from '../middleware/api' | |
const CHUNK_SIZE = 100 * 1024; | |
function sendChunk(dispatch, file, rangeStart = 0) { | |
let rangeEnd = rangeStart + CHUNK_SIZE; | |
if (rangeEnd > file.size) { | |
rangeEnd = file.size; |
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
/** | |
A pattern for abstract jQuery plugins | |
Author: Martin Vézina 2012 http://la-grange.ca | |
Licensed under the MIT license | |
*/ | |
;(function ( $, window, document, undefined ) { | |
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
/** | |
jQuery maskedSprite plugin | |
Author: Martin Vézina 2012 http://la-grange.ca | |
requires : | |
imagesLoaded (http://github.com/desandro/imagesloaded) | |
easel (http://www.createjs.com) | |
Licensed under the MIT license |
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
#!/bin/bash | |
# inspired by https://gist.github.com/968653 (https://github.com/jaymzcd) | |
# uses imagemagick to create spritesheets out of all the PNG images in a folder. | |
# There will be 2 passes done: | |
# - with the default tiling as determined by imagemagick | |
# - with the tiling optimization attempt by this script so as to leave no padding | |
# It seems that IM does not always produce the best optmization in regard to image size | |
# so compare and use the one that fits best. | |
# The spritesheets produced will be: | |
# - a PNG with transparency (32bits) |