hostname tab completion in your shell

sometimes you work in an environment with hostnames following intricate conventions Thankfully you can enable hostname bash completion: bash add in your ~/.bashrc complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh zsh add in your ~/.zshrc local knownhosts knownhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\… Continue reading hostname tab completion in your shell

Java, Terracotta

Pratiques de caching avançées

Cet article résume les différents points que nous avons abordés (ou pas par manque de temps) lors du hands-on avec Mathilde Lemee (@MathildeLemee). 1) Le mot 'cache' est tiré du Québecquois, cache, qui dénomme originellement l'endroit ou on entrepose des réserves. Il vient du français 'cache' qui désignait l'endroit où on cachait ses réserves (comme… Continue reading Pratiques de caching avançées


Hibernate 4 and Ehcache higher than 2.4.3

Update : As indicated in the following Jira from the Hibernate team Hibernate 4 supports Ehcache 2.4.x to 2.6.x If you have problems with a more recent of Ehcache, you should upgrade to Hibernate 5 I ran some tests and it appears that Ehcache up to 2.8.2 might work though (depending on the configuration… Continue reading Hibernate 4 and Ehcache higher than 2.4.3

Java, Terracotta

Configure a nonstop cache programmatically in Ehcache

Here's how to configure programmatically a nonstop cache in Ehcache (this one is clustered, connecting to terracotta running on localhost): import net.sf.ehcache.config.*; Configuration configuration = new Configuration() .terracotta(new TerracottaClientConfiguration().url("localhost:9510")) .defaultCache(new CacheConfiguration("defaultCache", 10000)) .cache( new CacheConfiguration("nonstopCache", 10000) .terracotta(new TerracottaConfiguration().consistency(TerracottaConfiguration.Consistency.STRONG) .nonstop(new NonstopConfiguration().enabled(true).timeoutMillis(4000) .timeoutBehavior(new TimeoutBehaviorConfiguration() .type(TimeoutBehaviorConfiguration.TimeoutBehaviorType.LOCAL_READS.getTypeName()))) ) ); CacheManager cacheManager = new CacheManager(configuration);


Install wget on MacOs

You need to have gcc installed, see my previous post then ftp tar -xvzf wget-1.13.tar.gz && cd wget-1.13 ./configure --with-ssl=openssl --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-nls --disable-rpath --with-gnu-ld make sudo make install