This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ps | grep ssh-agent &> /dev/null | |
then | |
. ~/.ssh-agent | |
else | |
ssh-agent > ~/.ssh-agent | |
. ~/.ssh-agent | |
ssh-add | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigInteger; | |
public class TryBigInt { | |
public static void main(String[] args) { | |
BigInteger start = new BigInteger("00000000000000000000000000000000", 16); | |
BigInteger end = new BigInteger("ffffffffffffffffffffffffffffffff", 16); | |
final long numRanges = 11; | |
BigInteger jump = (end.subtract(start)).divide(BigInteger.valueOf(numRanges)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package asv.tryspark; | |
import com.google.gson.Gson; | |
import static spark.Spark.*; | |
/** | |
* Created by albert on 2015/07/11. | |
*/ | |
public class Main { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.nio.MappedByteBuffer; | |
import java.nio.channels.FileChannel; | |
/** | |
* Opens a file, maps a chunk, closes. Expect to see many open filehandles until it GCs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"time" | |
) | |
func reader(f *os.File, data chan<- string, quit chan<- bool) { |