Skip to content

Instantly share code, notes, and snippets.

View paykroyd's full-sized avatar

Pete Aykroyd paykroyd

  • Google
  • Cambridge MA
View GitHub Profile
@paykroyd
paykroyd / __init__.py
Created May 20, 2011 00:16
Awesome Comment
# info = email.message_from_string(cached_value)
#
# Need to replace the line above with the kludge below
# to fix the non-existent bug not fixed in this
# bug report: http://mail.python.org/pipermail/python-bugs-list/2005-September/030289.html
@paykroyd
paykroyd / GwtAppCacheLinker.java
Created April 25, 2011 18:51
GWT Cache Manifest Linker
// Specify the LinkerOrder as Post... this does not replace the regular GWT linker and runs after it.
@LinkerOrder(LinkerOrder.Order.POST)
public class GwtAppCacheLinker extends AbstractLinker {
public String getDescription() {
return "to create an HTML5 application cache manifest JSP template.";
}
public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException {
ArtifactSet newArtifacts = new ArtifactSet(artifacts);
// search through each of the compilation results to find the one for Safari. Then
@paykroyd
paykroyd / gist:744065
Created December 16, 2010 21:37
curl example of how I ran into problems
$ elastic-mappings
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 2 0 2 0 0 48 0 --:--:-- --:--:-- --:--:-- 50
{}
$ curl -XPUT 'http://localhost:9200/twitter/' -d '
> index :
> number_of_shards : 3
> number_of_replicas : 2
> '