Skip to content

Instantly share code, notes, and snippets.

@davidkhala
davidkhala / KeyStoreTool.java
Created May 8, 2017 04:01
Tool for manage keystore
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableEntryException;
import java.security.UnrecoverableKeyException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
@davidkhala
davidkhala / Git-Design.md
Last active February 26, 2021 05:13
Git cheat sheet
  • Git in windows using CRLF for line-break and spaces
  • Git in Unix version it use CL, which will leads to lots of syntax error when running script
@davidkhala
davidkhala / update-copyright-year.sh
Last active January 11, 2021 09:20
Oracle OpenSource Utils: use to update copyright year in the updated files before commit.
  • Ternary Operator in some case could be simplified as a = a ? a : b => a = a || b
  • console.log() accepts 3 format symbols, %s => string, %d => integer, and %j => JSON data
@davidkhala
davidkhala / markdown.md
Last active February 21, 2021 13:33
Github Markdown CheatSheet
@davidkhala
davidkhala / TLS.md
Created April 21, 2021 13:44
Security Notes
  • 2013 TLS中的CBC块加密算法 被破解
  • 2013 TLS中的RC4流加密 被破解
  • GCM是内涵了加密算法和MAC算法的范式套件

TLS 1.3

  • TLS v1.3草案仅支持ChaCha20、AES-GCM和AES-CCM三种对称加密
  • TLS1.3中已经禁止了使用非AEAD的密码学套件

9 Choose a First Player.

Instead of all mechanism in Turn order, use following rules only

  • White Player is first player.
  • Turn Order is always clockwise

10 Take Startup Cash

Now, no compensation cash for successive players, all players receive $15 in income during setup.

Individual Player Setup

Place Workers and Scientists