Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'| 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); |
| #!/bin/sh | |
| # OUTDATED: please refer to the link below for the latest version: | |
| # https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh | |
| docker rm -f $(docker ps -qa) | |
| docker volume rm $(docker volume ls -q) | |
| cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
| for dir in $cleanupdirs; do | |
| echo "Removing $dir" | |
| rm -rf $dir | |
| done |
| // 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 () { |
| 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 | |
| } |
| # 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 | |