Skip to content

Instantly share code, notes, and snippets.

View tristantarrant's full-sized avatar
🏠
Working from home

Tristan Tarrant tristantarrant

🏠
Working from home
  • IBM
  • Italy
View GitHub Profile
<infinispan>
<jgroups>
<!-- Load external JGroups stacks -->
<stack-file name="jgroups-udp" path="jgroups-udp.xml"/>
</jgroups>
<cache-container name="clustered">
<!-- Use the stack -->
<transport cluster="cluster" stack="jgroups-udp"/>
...
@tristantarrant
tristantarrant / github_pull_request.sh
Created October 26, 2018 15:25
GitHub Pull Request script
#!/bin/bash
#
# This script can be set as a git alias (I alias it to `pr`)
# It will force push the current branch to your fork (github.userfork) and open your browser to the PR creation page already
# compiled with a link to the corresponding Jira (assuming the local branch begins with the Jira issue name)
#
# Configure the variables below for your environment
ORIGIN_REMOTE=`git config --get github.upstream`
if [ -z "$ORIGIN_REMOTE" ]; then
echo "Missing git config property 'github.upstream'. Set it to the name of the remote repository which represents upstream"
@tristantarrant
tristantarrant / HotRodDecoder.java
Created July 9, 2018 15:36
Generated HotRodDecoder.java
package org.infinispan.server.hotrod;
import java.util.List;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import java.time.ZonedDateTime;
import java.time.temporal.Temporal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@tristantarrant
tristantarrant / zulip-custom.css
Created April 26, 2018 13:31
Custom Zulip CSS
div.message_content {
font-family: 'Cantarell';
font-size: 16px;
}
textarea.new_message_textarea {
font-family: 'Cantarell';
font-size: 16px;
}
@tristantarrant
tristantarrant / WildcardTemplateJCache.java
Last active February 2, 2018 08:27
Infinispan Wildcard Configuration Template (JCache)
CachingProvider cachingProvider = Caching.getCachingProvider();
CacheManager cacheManager = cachingProvider.getCacheManager(
this.getClass().getResource("wildcard.xml").toURI(),
this.getClass().getClassLoader()
);
Cache<Object, Object> basiccache1 = cacheManager.createCache(
"basiccache1",
new MutableConfiguration<>()
);
@tristantarrant
tristantarrant / WildcardTemplate.java
Last active February 2, 2018 08:26
Infinispan Wildcard Configuration Template (programmatic)
EmbeddedCacheManager cm = new DefaultCacheManager();
cm.defineConfiguration("basecache*", new ConfigurationBuilder()
.expiration().lifespan(10)
.build());
Cache<Object, Object> basecache1 = cm.getCache("basecache1");
@tristantarrant
tristantarrant / wildcard.xml
Created February 2, 2018 08:01
Infinispan Configuration Template Wildcards
<infinispan>
<cache-container>
<local-cache-configuration name="basecache*">
<expiration interval="10500" lifespan="11" max-idle="11"/>
</local-cache-configuration>
<local-cache name="basecache-1"/>
<local-cache name="basecache-2"/>
</cache-container>
</infinispan>
@tristantarrant
tristantarrant / people.json
Created January 16, 2018 13:04
Infinispan team gnome-shell timezone extension
[
{
"github": "anistor",
"tz": "Europe/Bucharest"
},
{
"github": "danberindei",
"tz": "Europe/Bucharest"
},
{
@tristantarrant
tristantarrant / infinispan-weekly-irc-logs-2017-08-28.txt
Created August 29, 2017 12:00
Infinispan Weekly IRC logs 2017-08-28
Aug 28 16:02:56 <ttarrant> #startmeeting
Aug 28 16:03:16 <jsenko> ttarrant: skip me pls for now
Aug 28 16:03:25 <ttarrant> I guess jbott is out of order
Aug 28 16:03:39 * rettori_argh ([email protected]) has joined
Aug 28 16:03:39 * rettori_argh is now known as rettori
Aug 28 16:03:45 <ttarrant> #topic ttarrant
Aug 28 16:04:09 <ttarrant> not much to report
Aug 28 16:04:17 <ttarrant> as I've been on PTO for two weeks
Aug 28 16:04:21 <ttarrant> very much rested
Aug 28 16:04:36 <ttarrant> so much that I'll be on PTO again for the first four days next week too :)
<cache-container default-cache="default">
<local-cache name="default">
<persistence passivation="false">
<cloud-store xmlns="urn:infinispan:config:store:cloud:8.0"
provider="transient"
location="test-location"
identity="me"
credential="s3cr3t"
container="test-container"
endpoint="http://test.endpoint"