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
@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) => {
@p4535992
p4535992 / Importing JS
Created May 13, 2020 14:02 — forked from CesarCapillas/Importing JS
Alfresco Javascript Console Recipes
Import a script from the repository using a name-based path:
<import resource="/Company Home/Data Dictionary/Scripts/library.js">
Import a script from the repository using a NodeRef reference:
<import resource="workspace://SpacesStore/6f73de1b-d3b4-11db-80cb-112e6c2ea048">
Import a script from a Java classpath location:
@p4535992
p4535992 / TicketGenerator.java
Created May 5, 2020 07:03 — forked from LuisSala/TicketGenerator.java
Alfresco Login Ticket Generator Example in Java
package org.alfresco.sample;
import org.springframework.context.ApplicationContext;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.repo.security.authentication.AuthenticationException;
@p4535992
p4535992 / media-query.css
Created April 27, 2020 16:00 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@p4535992
p4535992 / app.component.ts
Created March 3, 2020 11:40 — forked from drew-thompson/app.component.ts
Basic lib-jitsi-meet Angular Implementation
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'jitsi';
private jitsi: any;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
...
WebClient client = WebClient.create(uri);
@p4535992
p4535992 / pom.xml
Created February 21, 2020 11:12 — forked from caspian311/pom.xml
Axis2 service with a Maven build
<!--
<project-directory>
- src
-main
- axis2
<all-wsdl-and-xsd-files>
- java
<all-src-code>
- resources
- META-INF
@p4535992
p4535992 / DefaultServiceLayerDecorator
Created February 14, 2020 17:03 — forked from skhatri/DefaultServiceLayerDecorator
GWT Integration with Spring without Servlet
package com.app.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import com.google.web.bindery.requestfactory.server.ServiceLayerDecorator;
import com.google.web.bindery.requestfactory.shared.Locator;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.ServiceLocator;
@p4535992
p4535992 / httpService.ts
Created February 3, 2020 08:33 — forked from cloudmark/httpService.ts
HttpService
export class HttpService {
constructor(private http: Http) {}
public getSingle<T>(clazz: { new(): T }, url: string, headers?: {}): Promise<T> {
return new Promise((resolve, reject) => {
this.http.get(url, this.getHeaders(headers)).toPromise().then((response: any) => {
let body = response.json();
if (body) {
resolve(MapUtils.deserialize(clazz, body));
} else {
@p4535992
p4535992 / Critical_Fumble_Tables
Created December 15, 2019 11:07 — forked from BaldarSilveraxe/Critical_Fumble_Tables
Roll20 API fumble and crit tables
//FumbleTables
roll20API.processAPI_FGM = function() {
var fumble = new Array();
fumble[0] = "Fumbler’s movements put them off balance. They take a -1 penalty to \
their armor class for the next round.";
fumble[1] = "Fumbler’s movements put them severely off balance. They lose Dexterity \
and Shield bonuses to AC for the next round. If losing these bonuses does not \
reduce the fumbler’s AC by -2 (or more), then they still must take a -2 penalty.";
fumble[2] = "Fumbler trips, and falls prone. They lose Dexterity and Shield bonuses \
to AC for the current round and the next round. If losing these bonuses does not \