Skip to content

Instantly share code, notes, and snippets.

@mattexdee
mattexdee / drawings-to-walls.js
Last active October 20, 2023 11:14 — forked from schultzcole/drawings-to-walls.js
A macro script to convert polygonal drawings to walls
let drawings = canvas.drawings.controlled;
drawings = drawings.map(drawing =>{
switch (drawing.data.type) {
case "f":
case "p": {
let { _id, points, rotation, x, y, width, height } = drawing.data;
return { id: _id, valid: true, points, rotation, x, y, width, height };
}
case "r": {
const table = game.tables.entities.find(t => t.name === "INSERT TABLE NAME HERE");
table.draw();
Username/Password:
COPY #1
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
COPY #2
sudo apt update && sudo apt install apache2-utils docker.io docker-compose
COPY #3
Copy #1
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
Copy #2
nano /etc/nginx/sites-available/
Copy #3
@mattexdee
mattexdee / Terminal Code
Created May 9, 2020 21:47
This code will add all of the files in a directory to an objects.txt file with quotation marks at the beginning and end with a comma.
cd your/directory/path/here
printf '"%s",\n' * > objects.txt
NOTE: There are single quotes before the double quotes in %s. All spaced out these are the characters: ' " % s " , \ n '