- wget linux rpm
- yum install rpm
- run
teamviewer setup
This file contains hidden or 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
# ssh反向隧道,实现NAT穿透 | |
# 在局域网内执行 | |
# 把局域网内的 192.168.1.100:443 暴露到 138.47.99.99:19999 | |
ssh -R 19999:192.168.1.100:443 [email protected] | |
# 暴露后的 138.47.99.99:19999 貌似只能本地访问,即 telnet localhost 19999 是通的,远程 telnet 138.47.99.99 19999 不通 | |
# 如果只是做ssh跳板机,上面就够了,先ssh到138.47.99.99再ssh localhost -p 19999 | |
# 如果要实现网页访问,即远程通过公网IP访问19999端口 |
This file contains hidden or 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
# 安装 | |
yum install postgresql-server postgresql-contrib | |
# 初始化 | |
postgresql-setup initdb | |
# ident 改为 md5,ident是使用系统账号验证; md5使用单独的数据库账号 | |
vi /var/lib/pgsql/data/pg_hba.conf | |
# 开机启动 |
This file contains hidden or 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
/* | |
From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators | |
Generators compute their yielded values on demand, which allows them to efficiently | |
represent sequences that are expensive to compute, or even infinite sequences as | |
demonstrated above. | |
The next() method also accepts a value which can be used to modify the internal state | |
of the generator. A value passed to next() will be treated as the result of the last | |
yield expression that paused the generator. |
This file contains hidden or 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
// insert and return id | |
@Insert("INSERT INTO photo_category (uuid, album_uuid, name, status, addtime, modtime) VALUES (" + | |
"REPLACE(UUID(), '-', ''), #{albumUuid}, #{name}, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())") | |
@SelectKey(before = false, keyProperty = "id", statement = "SELECT LAST_INSERT_ID()", resultType = Integer.class) | |
void insert(PhotoCategoryDO item); | |
// return HashMap | |
@ResultType(value = java.util.HashMap.class) | |
HashMap getSumDismissionRate(@Param("companyId") String companyId, @Param("yearmo") Integer yearmo); |
- 下载SDK版文件 https://nwjs.io/
- 解压后把 nwjs.app 移动到应用程序目录,其他的可以删了
- 创建 alias
alias nw="/Applications/nwjs.app/Contents/MacOS/nwjs"
This file contains hidden or 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 tests; | |
import org.apache.commons.codec.binary.Base64; | |
import javax.crypto.Cipher; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.PrivateKey; |
This file contains hidden or 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
<?php | |
/** | |
* Ported from Laravel 4 for external usage. | |
*/ | |
function is($pattern, $value) { | |
if ($pattern == $value) return true; | |
$pattern = preg_quote($pattern, '#'); |