Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@tusharm
tusharm / RedisTest.java
Last active August 31, 2016 02:38
Testcase for Redis client pipelining
import com.lambdaworks.redis.RedisClient;
import com.lambdaworks.redis.RedisConnectionPool;
import com.lambdaworks.redis.api.async.RedisAsyncCommands;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.concurrent.CompletableFuture;
@tusharm
tusharm / 213.hs
Created May 18, 2016 01:28
Daily.Prog.213
module Main where
import Data.List
xor :: [Char] -> Char
xor ['x',_,'x'] = '.'
xor ['.',_,'.'] = '.'
xor [_,_,_] = 'x'
transform xs = unlines $ take 25 $ iterate step xs
_command()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W 'foo bar baz' "$cur") )
return 0
} &&
complete -F _command command