Skip to content

Instantly share code, notes, and snippets.

View tagnullde's full-sized avatar
👨‍💻
Hacking

x41 tagnullde

👨‍💻
Hacking
View GitHub Profile
@tagnullde
tagnullde / VTT_Macro v2.1
Last active April 2, 2023 15:42
End of the World RPG - Dice Pool Macro v2
let positiveDice = 8;
let negativeDice = 8;
await EotW_ResolveRoll([positiveDice,negativeDice], "Test Roll", "A test roll");
//dicePool [+poolValue,-poolValue]
async function EotW_ResolveRoll(dicePool, title = '', flavor = '', img = ''){
let [positivePool, negativePool] = dicePool;
if (positivePool < 0) positivePool = 0;
if (negativePool < 0) negativePool = 0;
@tagnullde
tagnullde / Regen-Thumbnails
Last active May 12, 2023 19:48
Foundry VTT - Thumbnails Regenerator
(async () => {
for (const scene of game.scenes.filter(s=>s.folder?.name == "Theater of the Mind")) {
const t = await scene.createThumbnail({img: scene.img || undefined});
if (t?.thumb) {
console.log(`Regenerated thumbnail for ${scene.name}`);
await scene.update({thumb: t.thumb});
}
}
})();
@tagnullde
tagnullde / Source Changer
Last active April 8, 2023 17:44
Foundry VTT - Change Playlist Music Source
const folder = game.folders.getName("Music");
//wont work on folders that are not storing playlists
if (folder.documentClass.name !== "Playlist") return;
const playlists = folder.contents;
const updates = playlists.map(pl => {
const soundUpdates = pl.sounds.map(s => {
const file = s.path.split("/").at(-1);
const newPath = "modules/shared-compendiums/assets/audio/music/" + file;
return {_id: s.id, path: newPath};
@tagnullde
tagnullde / Bulk Create Scenes - Macro
Last active October 24, 2023 20:40
Foundry VTT - Create James RPG Art Scenes
const array1 = ['Tser Pool Encampment', 'Old Bonegrinder Megalith'];
const array2 = ['Tser-Pool-Encampment.mp4', 'Old-Bonegrinder-Megalith.mp4'];
const defaultScene = {
"folder": "ky71iloVQcMXBzt9",
"name": "Test",
"_id": "sU1sqnDUVFAaDRZb",
"active": false,
"navigation": false,
@tagnullde
tagnullde / Custom-CSS - Center Hotbar
Created March 26, 2023 14:46
Foundry VTT - Center Hotbar
#hotbar {
margin:auto
}
@tagnullde
tagnullde / Custom-CSS - Transparency
Created March 26, 2023 13:00
Foundry VTT - Remove Transparency
.window-app:not(.image-popout) {
background-color: var(--color-border-dark-5);
}
.window-app > header {
border: 1px solid var(--color-border-dark-4);
border-bottom: 1px solid var(--color-border-dark);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
}
@tagnullde
tagnullde / VTT_Macro
Created March 22, 2023 17:55
Foundry VTT - Macro to set Playlist to "loop" all tracks.
const options = game.playlists.reduce((acc,e) => acc += `<option value="${e.id}">${e.name}</options>`,``);
const content = `<form>
<div class="form-group">
<label>Playlist</label>
<div class="form-fields">
<select name="playlistId">${options}</select>
</div>
</div>
</form>`;
const id = await Dialog.prompt({
@tagnullde
tagnullde / tmux.config
Created October 22, 2021 13:33
tmux.config
# Set Prefix to "C"
set -g prefix2 C-c
bind C-c send-prefix -2
# Copy
bind-key -n F2 copy-mode
bind P paste-buffer
bind-key -T copy-mode v send-keys -X begin-selection
bind-key -T copy-mode y send-keys -X copy-selection
bind-key -T copy-mode r send-keys -X rectangle-toggle
@tagnullde
tagnullde / dice-pool-macro
Created August 14, 2021 17:26
Foundry VTT - End of the World - Zombie Apocalypse
(async ()=> {
//get the two numbers
let [pos_num, neg_num] = await quickDialog({
data : [
{ type : "number", label : "Positive Dice Pool", options : 1, },
{ type : "number", label : "Negative Dice Pool", options : 1, },
],
title : "End of the World: Zombie Apocalypse",
});
@tagnullde
tagnullde / Install.md
Last active August 9, 2021 08:39
Install LaTeX

Remove old shit

sudo apt-get remove texlive*

rm -rf /usr/local/texlive/2020

rm -rf ~/.texlive2020

rm -rf /usr/local/texlive/2019

rm -rf ~/.texlive2019