# init project
$ npm init -y
# save dependencies
$ npm install --save-dev babel-core babel-loader babel-preset-es2015 css-loader extract-text-webpack-plugin html-webpack-plugin style-loader webpack
This file contains hidden or 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
// FROM : https://gist.github.com/mathewbyrne/1280286 | |
function slugify(text) { | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
This file contains hidden or 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
- RESAMPLE : ffmpeg -i [INPUT] -b:v 800k -b:a 128k [OUTPUT] | |
- RESAMPLE (codecs) : ffmpeg -i [INPUT] -c:v libx264 -preset medium -b:v 1M -c:a aac -b:a 64k [OUTPUT] | |
- NOISE : ffmpeg -i [INPUT] -codec:v copy -codec:a copy -bsf:a noise [OUTPUT] | |
- CUT : ffmpeg -i [INPUT] -ss 30 -c copy -t 180 [OUTPUT] | |
- CUT (sec) : ffmpeg -i [INPUT] -ss 00:00:05 -t 00:00:35 -async 1 -c copy cut.mp4 | |
- SEGMENTS : ffmpeg -i [INPUT] -c copy -map 0 -segment_time 3 -f segment clip%04d.mp4 | |
- CONCAT : ffmpeg -f concat -i files.txt -c copy [OUTPUT] | |
- SCALE : ffmpeg -i [INPUT] -vf scale=640:360 [OUTPUT] | |
- SPEED : | |
ffmpeg -i [input] -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" out-fast.mp4 |
-
IntersectionObserver
-
Five Techniques to Lazy Load Images for Website Performance: https://www.sitepoint.com/five-techniques-lazy-load-images-website-performance/
-
How to Build Your Own Progressive Image Loader (default blured image):
This file contains hidden or 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
// ------------------------------------- | |
// The amazing always useful LERP function: | |
function lerp (start, end, t) { | |
return start * (1 - t) + end * t; | |
} | |
// ------------------------------------- | |
const linearInterpolation = function(canvas) { | |
// Options |
This file contains hidden or 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
/* | |
mini.css (@alterebro) | |
https://git.io/mini.css // returns wrong mime type. Use the one below | |
https://gistcdn.githack.com/alterebro/85f4271ce1bdfbbdd4689f02a71d0571/raw/mini.css (https://bit.ly/3wgknNz) | |
*/ | |
body { | |
max-width: 42rem; | |
margin: 0 auto; |
This file contains hidden or 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
I am attesting that this GitHub handle alterebro is linked to the Tezos account tz2BUeVRyvnCMwkRTVG24hssSGXPL6ao9HRF for tzprofiles | |
sig:spsig1VagJ4VsjoYcy9Bj5LKhH5dnKMQ4b6k3cXeSXKr4iVpFz45tF4NjVmLCQe3BZ922MSp3vzkLEdHCUdibxXBLFFp71KZH9c |
OlderNewer