Skip to content

Instantly share code, notes, and snippets.

Jon Wu wuservices

Block or report user

Report or block wuservices

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wuservices
wuservices / TimeScalacacheGetCaffeine.scala
Last active May 16, 2016
Informal test to see how much overhead Scalacache introduces on top of Caffeine.
View TimeScalacacheGetCaffeine.scala
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 / build-snippet.xml
Created Aug 20, 2012
Ant post-processing target to remove signature files from jar
View build-snippet.xml
<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 / product.json
Created Jan 17, 2012
JSON for Nested Backbone Models
View product.json
{
"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 Dec 7, 2011
Generating package.xml snippet to get email templates to Force.com IDE Winter '12
View emailTemplates.anonymous.apex
// 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)) {
You can’t perform that action at this time.