forked from wangyiwy/oktools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
110 additions
and
57 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 一个工具网站 | ||
![](shapshot.png) | ||
|
||
# 编译 | ||
1. 安装 Golang | ||
2. 安装 Git | ||
3. 构建 | ||
```shell | ||
git clone https://github.com/wangyiwy/oktools.git | ||
cd oktools | ||
go build | ||
``` | ||
4. 修改配置文件 | ||
```shell | ||
mv conf.yaml.default conf.yaml | ||
vi conf.yaml | ||
``` | ||
配置说明 | ||
```shell | ||
app: | ||
mode: release # debug / release | ||
log-file: oktools.log # 日志文件路径 | ||
|
||
http: | ||
port: 443 # 程序端口 | ||
ssl: # ssl 证书配置 , release 模式必须 | ||
crt: # example: /etc/oktools/oktools.net_nginx/oktools.net_bundle.crt | ||
key: # example: /etc/oktools/oktools.net_nginx/oktools.net.key | ||
``` | ||
6. 运行 | ||
```shell | ||
sh start.sh | ||
``` | ||
7. 停止 | ||
```shell | ||
sh stop.sh | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
app: | ||
mode: debug | ||
log-file: oktools.log | ||
mode: release # debug / release | ||
log-file: oktools.log # 日志文件路径 | ||
|
||
http: | ||
port: 80 | ||
ssl: | ||
enable: false | ||
crt: | ||
key: | ||
port: 443 # 程序端口 | ||
ssl: # ssl 证书配置 , release 模式必须 | ||
crt: # example: /etc/oktools/oktools.net_nginx/oktools.net_bundle.crt | ||
key: # example: /etc/oktools/oktools.net_nginx/oktools.net.key |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
chmod +x oktools | ||
nohup ./oktools >/dev/null 2>&1 & |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pid=`ps -ef | grep oktools | grep -v grep | awk '{print $2}'` | ||
if [ -z "pid" ]; | ||
then | ||
echo "not found pid of oktools" | ||
else | ||
echo "found pid of oktools: $pid" | ||
kill -9 $pid | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
{{define "aside"}} | ||
<aside> | ||
<h1 class="logo"><a href="/">OKTools</a></h1> | ||
<nav class="side-nav"> | ||
<p>JSON</p> | ||
<ul> | ||
<li><a href="/json">JSON格式化</a></li> | ||
<li><a href="/json2xml">JSON/XML转换</a></li> | ||
<li><a href="/json2yaml">JSON/YAML转换</a></li> | ||
<li><a href="/json2go">JSON转Go Struct</a></li> | ||
</ul> | ||
<p>Base64</p> | ||
<ul> | ||
<li><a href="/base64">Base64编码解码</a></li> | ||
<li><a href="/image2base64">图片Base64编码</a></li> | ||
</ul> | ||
<p>转换</p> | ||
<ul> | ||
<li><a href="/timestamp">Unix时间戳</a></li> | ||
<li><a href="/color">颜色值转换</a></li> | ||
<li><a href="/number">进制转换</a></li> | ||
<li><a href="/url">URL编码解码</a> | ||
<li><a href="/unicode">Unicode编码转换</a></li> | ||
<li><a href="/pdf2img">PDF转图片</a></li> | ||
<li><a href="/morse">摩斯电码</a></li> | ||
</ul> | ||
<p>Hash</p> | ||
<ul> | ||
<li><a href="/hash">Hash计算</a></li> | ||
<li><a href="/file-hash">文件Hash计算</a></li> | ||
</ul> | ||
<p>加密</p> | ||
<ul> | ||
<li><a href="/aes">AES加密解密</a></li> | ||
<li><a href="/des">DES加密解密</a></li> | ||
<li><a href="/rsa">RSA加密解密</a></li> | ||
</ul> | ||
<p>其他</p> | ||
<ul> | ||
<li><a href="/tinyimg">图片压缩</a></li> | ||
<li><a href="/qrcode">二维码制作</a></li> | ||
<li><a href="http://oktools.net/websocket">WebSocket测试</a></li> | ||
<li><a href="/regex">正则表达式测试</a></li> | ||
</ul> | ||
</nav> | ||
</aside> | ||
<aside> | ||
<h1 class="logo"><a href="/">OKTools</a></h1> | ||
<nav class="side-nav"> | ||
<p>JSON</p> | ||
<ul> | ||
<li><a href="/json">JSON格式化</a></li> | ||
<li><a href="/json2xml">JSON/XML转换</a></li> | ||
<li><a href="/json2yaml">JSON/YAML转换</a></li> | ||
<li><a href="/json2go">JSON转Go Struct</a></li> | ||
</ul> | ||
<p>Base64</p> | ||
<ul> | ||
<li><a href="/base64">Base64编码解码</a></li> | ||
<li><a href="/image2base64">图片Base64编码</a></li> | ||
</ul> | ||
<p>转换</p> | ||
<ul> | ||
<li><a href="/timestamp">Unix时间戳</a></li> | ||
<li><a href="/color">颜色值转换</a></li> | ||
<li><a href="/number">进制转换</a></li> | ||
<li><a href="/url">URL编码解码</a> | ||
<li><a href="/unicode">Unicode编码转换</a></li> | ||
<li><a href="/pdf2img">PDF转图片</a></li> | ||
<li><a href="/morse">摩斯电码</a></li> | ||
</ul> | ||
<p>Hash</p> | ||
<ul> | ||
<li><a href="/hash">Hash计算</a></li> | ||
<li><a href="/file-hash">文件Hash计算</a></li> | ||
</ul> | ||
<p>加密</p> | ||
<ul> | ||
<li><a href="/aes">AES加密解密</a></li> | ||
<li><a href="/des">DES加密解密</a></li> | ||
<li><a href="/rsa">RSA加密解密</a></li> | ||
</ul> | ||
<p>其他</p> | ||
<ul> | ||
<li><a href="/tinyimg">图片压缩</a></li> | ||
<li><a href="/qrcode">二维码制作</a></li> | ||
<li><a href="#" onclick="hrefForNoTLS('/websocket')">WebSocket测试</a></li> | ||
<li><a href="/regex">正则表达式测试</a></li> | ||
</ul> | ||
</nav> | ||
</aside> | ||
<script> | ||
function hrefForNoTLS(path) { | ||
window.location.href = 'http://' + window.location.host + path; | ||
} | ||
</script> | ||
{{end}} |
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