Skip to content

Instantly share code, notes, and snippets.

@wuservices
wuservices / zendesk.d.ts
Last active December 1, 2023 16:17 — forked from vsaarinen/zendesk.d.ts
Type definitions for Zendesk messaging Web Widget SDK from https://developer.zendesk.com/api-reference/widget-messaging/introduction/
/**
* Zendesk messaging Web Widget SDK
* https://developer.zendesk.com/api-reference/widget-messaging/introduction/
*/
interface ZendeskMessagingWidget {
/**
* If your application has a login flow, or if a user needs to access the same conversation from multiple devices,
* you can use the `loginUser` API.
*
* You can associate users with your own user directory by issuing a `JWT` credential during the login flow.
@wuservices
wuservices / build-snippet.xml
Created August 20, 2012 18:12
Ant post-processing target to remove signature files from jar
<target name="remove-signatures">
<exec executable="zip">
<arg value="-d"/>
<arg value="${artifact.output.path}/output.jar"/>
<arg value="*.RSA"/>
<arg value="*.SF"/>
<arg value="*.DSA"/>
</exec>
</target>
@wuservices
wuservices / TimeScalacacheGetCaffeine.scala
Last active May 16, 2016 17:30
Informal test to see how much overhead Scalacache introduces on top of Caffeine.
object TimeScalacacheGetCaffeine {
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}
import scala.concurrent.ExecutionContext.Implicits.global
import com.github.benmanes.caffeine.cache.Caffeine
import com.github.blemale.scaffeine.{Cache, Scaffeine}
import scalacache._
import caffeine._
@wuservices
wuservices / product.json
Created January 17, 2012 17:20
JSON for Nested Backbone Models
{
"shortTitle":"Capture the Moments",
"personalizationData":{
"cardWidth":328.5005,
"cardHeight":449.28076,
"textBoxes":[
{
"x":36.277344,
"y":96.555664,
"width":255.99951,
@wuservices
wuservices / emailTemplates.anonymous.apex
Created December 7, 2011 23:30
Generating package.xml snippet to get email templates to Force.com IDE Winter '12
// Derived from http://paulbattisson.com/?p=80
String output = '\n<types>\n';
List<EmailTemplate> templates = [Select e.FolderId, e.DeveloperName From EmailTemplate e];
Map<Id, Folder> folders = new Map<Id, Folder>([Select f.Id, f.DeveloperName From Folder f where f.DeveloperName != null]);
Set<Id> folderIds = new Set<Id>();
folderIds.addAll(folders.keySet());
for (EmailTemplate template: templates) {
if (folders.keySet().contains(template.FolderId)) {