Skip to content

Instantly share code, notes, and snippets.

@aogonevskiy
aogonevskiy / GuavaCacheBuilderTest
Last active December 17, 2015 09:08
Google Guava CacheBuilder example
import com.google.common.cache.*;
import java.util.BitSet;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
public class Test {
private LoadingCache<String, BitSet> cache = null;
@aogonevskiy
aogonevskiy / christmas_lights.ino
Created October 12, 2012 02:27
Christmas lights switch
// 2 PINS - output pin numbers
int PINS[2] = {
10,11};
int PINS_CNT= sizeof(PINS) / sizeof(int);
// 2 PINS PATTERNS
char* PATTERN[] = {
"11|500", "10|500", "11|500", "01|500"};
int PATTERN_CNT = 4;