clipboard in terminal(copy/paste)

Was watching a CD video with Semaphore and saw the guy in the video manipulating clipboard with pipe directly in the terminal. Pretty cool! Did some research on that. OSX(MacOS) In Mac, it is pretty straightforward with the built in pbcopy and pbpaste. (pasteboard copy / paste). Some examples: cat my.key.pub | pbcopy pbpaste > my.otherKey.pub ps…

LDAP notes on Forgerock OpenDJ

Forgerock has a good explanation on their openDJ, LDAP, DS etc… Below are some of my notes. LDAP directory data is organized into entries, similar to the entries for words in the dictionary, or for subscriber names in the phone book. dn: uid=bjensen,ou=People,dc=example,dc=com uid: bjensen cn: Babs Jensen cn: Barbara Jensen facsimileTelephoneNumber: +1 408 555…

各种license关系

GPL,以GPL为基础的软件也要用GPL,或者跟GPL兼容。有一个种方式可以做到不用GPL,把该软件版权持有者的公司,收购了,这是后话。目前GPL的主要流行版本是GPLv2 和GPLv3, 至于区别,可以理解为GPLv3有专利报复条款。 Apache License 比较宽松一些,简单可以理解为,在该授权软件基础上的软件可以不开源。 CDDL 可以理解为GPL 和Apache的折中,在一个软件中用不同几个包,在一个包里边,就是该比较完整的模块必须用CDDL,其他的可以用别的,甚至,不开源。 EPL则是因为后来IBM将Eclipse IDE交由名为“Eclipse基金会 (Eclipse Foundation)”来管理,对CPL为小部分修改为成的授权条款。EPL可以理解为在EPL授权的软件基础上的工作,如果新开的软件是源软件独立,就可以用其他的license,否则,只能用EPL。举个例子,你对EPL授权的软件,修正的bug,添加的性能提升,都不算独立的部分。

java volatile 可见行(Visibility),原子性(Atomicity),有序性(Ordering)

Saw a very good Chinese article explaining Visibility/Atomicity/Ordering for the volatile keyword.  From HERE. Summary is Volatile provides visibility and ordering but not atomicity. Locking guarantees atomicity, visibility and ordering. So volatile is not a substitute for synchronization. HERE is another article from one of the jsr-133 author written back in 2007 but still very informative. 一、Java内存模型 想要理解volatile为什么能确保可见性,就要先理解Java中的内存模型是什么样的。…