Skip to content

Instantly share code, notes, and snippets.

@nlwillia
nlwillia / ChainParser.java
Last active December 17, 2015 11:29
https://jira.springsource.org/browse/INT-3023 This is an example of how the Chain namespace parser could be extended to support embedding an inbound-channel-adapter at the top of the chain and inferring a direct channel between the adapter and the chain. The details are in the added parseInboundChannelAdapters method.
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
@nlwillia
nlwillia / plugin-translate-cache.js
Last active July 28, 2016 15:14
SystemJS translate hook that caches transpilation results of sources that haven't changed in IndexedDB storage.
/**
* SystemJS translate hook that caches transpilation results of sources that haven't changed in IndexedDB storage.
* In Chrome dev tools the cache is easily managed under Resources > IndexedDB > jspm
* There's a global dependency on Dexie.js (ex: //npmcdn.com/dexie@1.3.3/dist/dexie.min.js)
* Adapted from https://gist.github.com/ineentho/3ccaaec164e418f685d7
*/
;(function(){
var db = new Dexie("jspm");
db.version(1).stores({ files: "&url,format,hash,contents" });
db.open();
@nlwillia
nlwillia / javadoc-pinning.js
Last active June 6, 2017 19:21
Javadoc Pinning Enhancement Bookmarklet
$(function() {
function addPinningSupport() {
var frame = $(this);
// Clean up
frame.off('load', addPinningSupport);
var body = frame[0].contentDocument.body;
$('.pinning', body).remove();
frame.on('load', addPinningSupport);