Skip to content

Instantly share code, notes, and snippets.

View p4535992's full-sized avatar
🙄
I may be slow to respond.

4535992 p4535992

🙄
I may be slow to respond.
View GitHub Profile
package imap_pop3_email.actions;
import imap_pop3_email.proxies.Attachment;
import imap_pop3_email.proxies.AttachmentPosition;
import imap_pop3_email.proxies.EmailAccount;
import imap_pop3_email.proxies.EmailMessage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@p4535992
p4535992 / Explorer.gwt.xml
Created November 14, 2023 10:28 — forked from branflake2267/Explorer.gwt.xml
GXT 4 permutations, setting specific build properties.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='explorer'>
<inherits name='com.google.gwt.activity.Activity' />
<inherits name='com.google.gwt.place.Place' />
<inherits name="com.google.gwt.inject.Inject" />
<inherits name='com.sencha.gxt.examples.resources.Resources' />
<inherits name='com.sencha.gxt.chart.Chart' />
@p4535992
p4535992 / 0-JS-SORTABLE-TABLE.MD
Created September 18, 2023 11:04 — forked from code-boxx/0-JS-SORTABLE-TABLE.MD
Javascript Sortable Table
async function determineWeather(currentWeather) {
//roll the dice and get the result
let diceRoll = await new Roll("1d20").evaluate()
let diceResult = await diceRoll.result
// selects the table to roll based on current weather input from Dialog
let tableToRoll
switch (currentWeather) {
case "no":
// FROM Jenthura ( https://github.com/jenthura/foundryVTT5eConditionRulesMacro/blob/master/ConditionRulesMacro.js )
function postToChat(conditionName, imgURL, message){
let chatData = {
user: game.user._id,
speaker: {alias: "Conditions"},
content: `<div class="dnd5e chat-card" style="text-align: center"><header class="card-header flexrow"><h3 class="item-name">${conditionName}</h3></div><br><div style="text-align: center"><img width=75% height=50% src="${imgURL}"</img></div><br>${message}`
};
ChatMessage.create(chatData, {});
};
@p4535992
p4535992 / FileUtil.java
Created September 9, 2020 13:38 — forked from suweya/FileUtil.java
OkHttp download file by Okio
import android.os.Environment;
import android.support.annotation.NonNull;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
var assocname = '<thumbnailname>';
var node = document.childAssocs['rn:rendition'].filter(function(assoc){
return assoc.name == assocname;
})[0];
if(node){
logger.log(node.remove());
}
@p4535992
p4535992 / ua.md
Created May 27, 2020 16:32 — forked from jwodder/ua.md
D&D 5e Unearthed Arcana Index

D&D 5e Unearthed Arcana Index

Because finding anything in this page is harder than it should be

Date Article PDF Contents
2015-02-02 Unearthed Arcana: Eberron UA_Eberron_v1.1.pdf Changelings, shifters, warforged, Wizard (Artificer), rules for action points, dragonmarks
@p4535992
p4535992 / foundry-item-permission.js
Created May 20, 2020 07:11 — forked from janssen-io/foundry-set-folder-permissions.js
Change the permissions of items in bulk in FoundryVTT.
var folderName = "Test";
var reqPermission = 0; // 0=None, 1=Limited, 2=Observer, 3=Owner
/*****
WARNING: This will overwrite the permissions of the items in the folder <folderName>!
That is, it will not keep the player permissions!
Tested on FoundryVTT 0.5.5
******/
@p4535992
p4535992 / foundryvtt-token-vision.js
Created May 16, 2020 17:54 — forked from Aarowaim/foundryvtt-token-vision.js
A macro for the Foundry virtual tabletop that lets a user configure their token's vision and lighting setting. Has a dependency on About Time by Tim Posney.
if (canvas.tokens.controlled.length === 0)
ui.notifications.error("Please select a token");
if (game.modules.get("about-time").active != true)
ui.notifications.error("About Time isn't loaded");
let namedfields = (...fields) => {
return (...arr) => {
var obj = {};
fields.forEach((field, index) => {