2018年4月21日星期六

IntelliJ IDEA License Server本地搭建教程补足


lanyu 的软件的使用方法见:

http://blog.lanyus.com/archives/174.html


Linux 系统的安装过程见如下:
https://blog.csdn.net/Mr_OOO/article/details/78721944

其中缺少一些安全性的考量和简单的关键步骤:

1.  在服务器程序的运行目录,执行


1
2
3
4
$> touch  IntelliJIDEALicenseServer.html

  这只需要是一个空文件,不需要实际内容


2. server 的参数问题

1
2
3
4
-l 指定绑定监听到哪个IP(私人用)
-u 用户名参数,当未设置-u参数,且计算机用户名为^[a-zA-Z0-9]+$时,使用计算机用户名作为idea用户名
-p 参数,用于指定监听的端口
-prolongationPeriod 指定过期时间参数



这里有的启动脚本使用了 -l  127.0.0.1 这是错误的,这将使服务不能监听外部网络接口,没有必要;

3. 执行用户问题
      由于服务器端是非公开源代码程序,使用root执行脚本或者程序是极为不安全的,有可能成为原作者的肉鸡服务器。
      建议以非特权用户 按需执行该程序。



2018年4月3日星期二

Howto: LG UltraFine 5K 显示器的屏幕在macOS上的90度旋转方法

Howto rotate LG UltraFine5K Monitor 90/180/270 degree with macOS  (High) sierra


Q: LG UltraFine5K 显示器可以旋转吗?
A: 可以, 它自带了一个替换背板,可以安装到一个VESA兼容支架上,即可旋转;

Q: LG UltraFine5K 显示器在macOS上没有旋转选项?
A: 是的, 到目前为止 LG的UltraFine5k 与 苹果公司之间的互相指责对方的问题并没有一个结果,消费者依然不能在 macOS上看到给 LG UltraFine5k的 rotation 选项 ;
(对,it can not be found by pressing  Command+Option with ur system preference /Display, it is not an operation issue, it is a macOS BUG!)

https://forums.macrumors.com/threads/lg-5k-display-no-rotation-option-in-macos-display-preferences.2103300/

Q:这个病能治吗?
A:  已经有了解决方案,如果你了解mac的开发相关知识(能够搭建一些开发环境,执行一些命令),github上已经有了解决方案:

原文参见:
https://apple.stackexchange.com/questions/189965/screen-rotation-bug-and-reset?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

也可以直接访问下方
https://github.com/CdLbB/fb-rotate

clone fb-rotate ,然后编译安装即可。