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
const ExcelJS = require('exceljs'); | |
const workbook = new ExcelJS.Workbook(); | |
const data = await workbook.xlsx.readFile('./test.xlsx'); | |
const worksheet = workbook.worksheets[0]; | |
for (const image of worksheet.getImages()) { | |
console.log('processing image row', image.range.tl.nativeRow, 'col', image.range.tl.nativeCol, 'imageId', image.imageId); | |
// fetch the media item with the data (it seems the imageId matches up with m.index?) | |
const img = workbook.model.media.find(m => m.index === image.imageId); | |
fs.writeFileSync(`${image.range.tl.nativeRow}.${image.range.tl.nativeCol}.${img.name}.${img.extension}`, img.buffer); |
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
// just an example. A cleaner way is to wrap the showLine-stuff in a dedicated component | |
<template> | |
<div> | |
<my-line v-if="showLine" :data="lineData" :options="options"> | |
</div> | |
</template> | |
<script> | |
export default { | |
data () { |
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
var BrowserPrint = function() { | |
function e(e) { | |
return s + e | |
} | |
function n(e, n) { | |
var i = new XMLHttpRequest; | |
return "withCredentials" in i ? i.open(e, n, !0) : "undefined" != typeof XDomainRequest ? (i = new XDomainRequest, i.open(e, n)) : i = null, i | |
} |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |