Skip to content

Instantly share code, notes, and snippets.

View galderz's full-sized avatar

Galder Zamarreño galderz

View GitHub Profile
@galderz
galderz / gitsyncupstream.sh
Created November 15, 2010 10:53 — forked from maniksurtani/gitsyncupstream.sh
A forked version of Manik's script that avoids issues stashing when only untracked files are present (i.e. old branch that has not had git ignores updated)
#!/bin/bash
####################################################################################
#
# This script syncs your private, personal checkout with an upstream repository.
#
###################################################################################
# This is where your local, priave copy is checked out
LOCAL_REPO=${HOME}/Code/infinispan/my_repo
...
import javax.ejb.Stateless;
import javax.inject.Inject;
@Stateless
class FooEJB {
@Inject
Cache<String, String> defaultCache;
@Inject
...
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.infinispan.Cache;
import org.infinispan.manager.EmbeddedCacheManager;
@Stateless
class FooEJB {
@Inject
Cache<String, String> defaultCache;
...
import javax.enterprise.inject.Produces;
import org.infinispan.cdi.ConfigureCache;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
class Config {
@ConfigureCache("my-cache-name")
@MyCacheQualifier
@Produces
...
import javax.cache.interceptor.CacheResult;
import javax.cache.interceptor.CachePut;
import javax.cache.interceptor.CacheValue;
import javax.cache.interceptor.CacheRemoveEntry;
import javax.cache.interceptor.CacheRemoveAll;
class MyDAO {
@CacheResult(cacheName = "user-cache")
User getUser(long id) {...};
@galderz
galderz / HotRodSegmentsProposal
Last active August 29, 2015 13:57 — forked from danberindei/HotRodSegmentsProposal
Here's an updated version of the segments proposal.
Response header with topology change marker
Topology Id [vInt]
Num servers in topology [vInt]
m1: Host/IP length [vInt] m1: Host/IP address [string] m1: Port [2b - unsigned short]
m2: Host/IP length [vInt] m2: Host/IP address [string] m2: Port [2b - unsigned short]
Hash Function Version [1b]
Num segments in topology [vInt]
s1: Num owners [1b] s1: 1st owner's index [vInt] s1: 2nd owner's index [vInt]
s2: Num owners [1b] s2: 1st owner's index [vInt] s2: 2nd owner's index [vInt]
...
#!/usr/bin/env scalas
/***
// $ cs sbt/sbt --branch 0.13.2b
// $ export CONSCRIPT_OPTS="-XX:MaxPermSize=512M -Dfile.encoding=UTF-8"
// $ chmod -x scripts.scala
scalaVersion := "2.10.4"
resolvers += Resolver.url("typesafe-ivy-repo", url("http://typesafe.artifactoryonline.com/typesafe/releases"))(Resolver.ivyStylePatterns)
@galderz
galderz / custom.cnf
Created September 12, 2022 15:50 — forked from Sanne/custom.cnf
MySQL configuration for testing
#
# MariaDB tuning meant for fast integration test execution:
# data is meant to be lost. Never use for actual database needs!
#
[mysqld]
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links = 0