Skip to content

Instantly share code, notes, and snippets.

package com.javaforu.rsync;
import com.javaforu.rsync.Sync.CharRingBuffer.Visitor;
import rollinghash.RabinKarpHash;
import java.util.*;
import java.util.zip.CRC32;
/**
* Author: Ashwin Jayaprakash / ashwin.jayaprakash@gmail.com / http://www.ashwinjayaprakash.com
@AshwinJay
AshwinJay / bash-loop.sh
Last active May 20, 2016 03:28
How to: Basic GNU Linux/Mac command line tools (Also mostly works with GOW on Windows)
#! /bin/bash
a=(user1 pass1 user2 pass2)
for ((i=0; i<${#a[@]}; i+=2)); do
echo "Loop 1: ${a[i]}: ${a[i+1]}"
done
a1=(user1 user2)
a2=(pass1 pass2)
for ((i=0; i<${#a1[@]}; i+=1)); do
@AshwinJay
AshwinJay / seed.md
Last active July 7, 2020 03:03
Tech reading list to help people get started with programming, design and Java etc.
@AshwinJay
AshwinJay / readme.md
Last active August 7, 2020 03:10
Tech reading list to help people get started with programming, design and Java etc.
@AshwinJay
AshwinJay / productivity.md
Last active July 7, 2020 03:04
My notes on maintaining a low distraction environment and avoiding information overload
@AshwinJay
AshwinJay / LogInvocationStyleBenchmark.java
Last active August 27, 2017 18:28
Java logger invocation style benchmark
package com.foo;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import java.util.Random;
import java.util.function.Supplier;
@AshwinJay
AshwinJay / LambdaCapture.java
Last active August 27, 2017 18:28
Simple Java lambda tests
package com.foo;
import java.util.LinkedList;
import java.util.List;
public class LambdaCapture {
public static void main(String[] args) {
List<String> strings = new LinkedList<>();
strings.add("one");
strings.add("two");