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
URL="https://dl.google.com/dl/android/aosp/ryu-opm4.171019.021.n1-factory-1f31fdce.zip" | |
TMP="tmp.zip" | |
OUT="output.zip" | |
# fetch the important "PK" region from the remote zip by specifying offsets* | |
curl --header "Range: bytes=1842-3820027" -k $URL > $TMP | |
# restore "corrupted" zip data (answer yes to question it prompts) | |
echo y | zip -FF $TMP --out $OUT |
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
socket.on("render_data", function(data) { | |
console.log("render_data"); | |
var canvas = document.getElementById('mycanvas'); | |
var ctx = canvas.getContext('2d'); | |
var canvasWidth = canvas.width; | |
var canvasHeight = canvas.height; | |
var img = new Image(); | |
img.onload = function() { ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight); }; |