--
--
const resizeToWidth = 800; | |
const resizeToHeight = 600; | |
const canvas = document.getElementById("canvas"); | |
const image = document.getElementById("source"); | |
const ctx = canvas.getContext("2d"); | |
// Get *real* image size with naturalXXX | |
const {naturalWidth: imageWidth, naturalHeight: imageHeight} = image; |
<html> | |
<body> | |
<h1>Original image</h1> | |
<img | |
id="source" | |
src="https://fabianrensch.com/images/fanart/legend-of-zelda-breath-of-the-wild-fanart.jpg" | |
/> | |
<h2>Transformed image</h2> | |
<canvas id="canvas"></canvas> | |
</body> |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# |
.DS_Store |
%w(won won won won won won LOST).inject(%w(lucas asis oscar adrian alejo marcos david)) {|acc,s| puts [acc.delete_at(rand(acc.length)),s].join(' ');sleep 3 if acc.length > 1; acc} |