Skip to content

Commit 2bc18d8

Browse files
committed
Open Source
1 parent 143ac21 commit 2bc18d8

File tree

8,886 files changed

+4238469
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,886 files changed

+4238469
-29
lines changed

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ---> Go
2+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
3+
*.o
4+
*.a
5+
*.so
6+
7+
# Folders
8+
_obj
9+
_test
10+
11+
# Architecture specific extensions/prefixes
12+
*.[568vq]
13+
[568vq].out
14+
15+
*.cgo1.go
16+
*.cgo2.c
17+
_cgo_defun.c
18+
_cgo_gotypes.go
19+
_cgo_export.*
20+
21+
_testmain.go
22+
23+
*.exe
24+
*.exe~
25+
*.zip
26+
*.7z
27+
*.log
28+
*.test
29+
*.prof
30+

LICENSE

+5-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
Copyright (c) 2016, insion
2-
All rights reserved.
1+
Copyright (c) <year> <owner> All rights reserved.
2+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
33

4-
Redistribution and use in source and binary forms, with or without
5-
modification, are permitted provided that the following conditions are met:
4+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
65

7-
* Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
6+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
97

10-
* Redistributions in binary form must reproduce the above copyright notice,
11-
this list of conditions and the following disclaimer in the documentation
12-
and/or other materials provided with the distribution.
13-
14-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# YOUGAM V3.0+ 问题反馈专用
1+
# YOUGAM V4.0+ 问题反馈专用
22

3-
###YOUGAM 官方网站
3+
### YOUGAM 官方网站
44
http://www.yougam.com/
55

6-
###V3.0+ 开发版本测试网站
7-
http://inchina.xin:8000/
86

9-
##购买YOUGAM源码与商业授权
10-
###原价:¥~~2000~~,现价:¥998
11-
###服务:购买后如有功能需求可提出,版本更新升级永久免费
7+
## 购买YOUGAM源码与商业授权
128

9+
### 原价:¥~~2000~~,现价:¥998
1310

14-
###作者微信:
11+
### 服务:购买后如有功能需求可提出,版本更新升级永久免费
12+
13+
14+
### 作者微信:
1515
xiongtuntianxia (雄吞天下)
16-
###作者 QQ:
16+
### 作者 QQ:
1717
547092001
1818

build-hidden.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
go build -ldflags -H=windowsgui yougam.go
2+
3+
pause

build.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
echo "::Building Yougam::"
2+
3+
find ./ -type f -path "*.go"|xargs sed -i 's://_ "yougam/libraries/mattn/go-sqlite3" // need cgo!:_ "yougam/libraries/mattn/go-sqlite3" // need cgo!:g'
4+
#重复替换多次避免遗留
5+
find ./ -type f -path "*.go"|xargs sed -i 's://_ "yougam/libraries/mattn/go-sqlite3" // need cgo!:_ "yougam/libraries/mattn/go-sqlite3" // need cgo!:g'
6+
echo "::Disable Cgo::"
7+
find ./ -type f -path "*.go"|xargs sed -i 's:_ "yougam/libraries/mattn/go-sqlite3" // need cgo!://_ "yougam/libraries/mattn/go-sqlite3" // need cgo!:g'
8+
9+
CGO_ENABLED="0" go build ./
10+
echo "Okay!"

conf/config.conf

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[site]
2+
Domain = localhost:8000
3+
SiteName = 有感社区
4+
Aes5Keys = Ks*x(
5+
SiteTitle = 有感社区 - 记录分享探索世界的有趣轨迹, JavaScript, C, C++, Go, Java, Python, Hack, PHP, Erlang, D, Xhp, ASP.NET, Scala, Ruby on Rails, Perl, C# (ASP.NET MVC), 优姬编程语言技术交流社区
6+
Keywords = YOUGAM, JavaScript, C, C++, Go, Java, Python, Hack, PHP, Erlang, D, Xhp, ASP.NET, Scala, Ruby on Rails, Perl, C# (ASP.NET MVC), 编程语言
7+
Description = 有感社区..
8+
9+
[datebase]
10+
#DataType = goleveldb
11+
#DataType = sqlite
12+
#Connect = ./data/sqlite.db
13+
DataType = mysql
14+
Connect = root:rootpass@tcp(127.0.0.1:3306)/test?charset=utf8
15+
16+
[mail]
17+
SmtpHost = smtp.163.com
18+
SmtpPort = 25
19+
20+
MailPassword = M539ga22mRp33sW
21+
MailAdline = YouGam.Com • 分享、探索和创造的地方.
22+
23+
[signup]
24+
sendmail = false
25+
captcha = true
26+
27+
[themes]
28+
style = wind
29+

conf/locale/locale_en-US.ini

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
app_desc = YouGam lightweight Community system, based on the calorific value of voting algorithms and conceptual design of lightweight community simple Community system
2+
3+
home = Home
4+
users = Users
5+
contact = Contact
6+
signin = Sign in
7+
signup = Sign up
8+
notifications = Notifications
9+
new-topic = New Topic
10+
new-node = New Node
11+
profile = Profile
12+
settings-profile = Settings Profile
13+
settings-avatar = Settings Avatar
14+
settings-password = Settings Password
15+
dashboard = Dashboard
16+
signout = Sign Out
17+
18+
not-yet = Not yet
19+
20+
topics-optimal = Optimal
21+
topics-lastest = Lastest
22+
topics-hotness = Hotness
23+
topics-rising = Rising
24+
topics-scores = Scores
25+
topics-votes = Votes
26+
topics-controversial = Controversial
27+
topics-popular = Popular
28+
topics-cold = Cold
29+
topics-favorites = Favorites
30+
topics-follow = Follow
31+
32+
top-topics = Top Topics
33+
34+
comments = Comments
35+
optimal-comments = Optimal Comments
36+
recent-comments = Recent Comments
37+
38+
hot-topics = Hot Topics
39+
optimal-nodes = Optimal Nodes
40+
optimal-topics = Optimal Topics
41+
latest-topics = Latest Topics
42+
43+
signup-now = Sign Up Now
44+
statistics = Statistics
45+
46+
previous-page = Previous Page
47+
next-page = Next Page

conf/locale/locale_zh-CN.ini

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
app_desc = YouGam轻量级社区系统,基于热值投票算法与轻量社区概念设计的简约社区系统
2+
3+
home = 首页
4+
users = 用户榜
5+
contact = 通信录
6+
signin = 登录
7+
signup = 注册
8+
notifications = 通知消息
9+
new-topic = 创建话题
10+
new-node = 创建节点
11+
profile = 个人档案
12+
settings-profile = 设置资料
13+
settings-avatar = 设置头像
14+
settings-password = 修改密码
15+
dashboard = 控制面板
16+
signout = 退出登录
17+
18+
not-yet = 尚无
19+
20+
topics-optimal = 优质话题
21+
topics-lastest = 新鲜话题
22+
topics-hotness = 热辣话题
23+
topics-rising = 话题趋势
24+
topics-scores = 高分话题
25+
topics-votes = 高票话题
26+
topics-controversial = 热议话题
27+
topics-popular = 流行话题
28+
topics-cold = 冷门话题
29+
topics-favorites = 话题收藏
30+
topics-follow = 关注话题
31+
32+
top-topics = 置顶话题
33+
34+
comments = 评论
35+
optimal-comments = 优质评论
36+
recent-comments = 最近评论
37+
38+
hot-topics = 热门话题
39+
optimal-nodes = 优质节点
40+
optimal-topics = 优质话题
41+
latest-topics = 最新话题
42+
43+
signup-now = 现在注册
44+
statistics = 统计数据
45+
46+
previous-page = 上一页
47+
next-page = 下一页

conf/nginx.conf

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
#user nobody;
2+
worker_processes auto;
3+
worker_cpu_affinity auto;
4+
5+
error_log logs/error.log;
6+
#error_log logs/error.log notice;
7+
#error_log logs/error.log info;
8+
9+
pid logs/nginx.pid;
10+
11+
events
12+
{
13+
use epoll;
14+
worker_connections 51200;
15+
}
16+
17+
# load modules compiled as Dynamic Shared Object (DSO)
18+
#
19+
#dso {
20+
# load ngx_http_fastcgi_module.so;
21+
# load ngx_http_rewrite_module.so;
22+
#}
23+
24+
http {
25+
include mime.types;
26+
default_type application/octet-stream;
27+
28+
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
29+
# '$status $body_bytes_sent "$http_referer" '
30+
# '"$http_user_agent" "$http_x_forwarded_for"';
31+
32+
#access_log logs/access.log main;
33+
34+
sendfile on;
35+
#tcp_nopush on;
36+
37+
#keepalive_timeout 0;
38+
keepalive_timeout 65;
39+
40+
gzip on;
41+
gzip_min_length 1k;
42+
gzip_comp_level 5;
43+
gzip_buffers 4 16k;
44+
gzip_http_version 1.1;
45+
gzip_types text/plain application/x-javascript text/css application/xml;
46+
gzip_proxied any;
47+
48+
fastcgi_connect_timeout 900;
49+
fastcgi_send_timeout 900;
50+
fastcgi_read_timeout 900;
51+
52+
server {
53+
listen 80;
54+
server_name .yougam.com;
55+
if ($host != 'www.yougam.com' ) {
56+
rewrite ^/(.*)$ http://www.yougam.com/$1 permanent;
57+
}
58+
index default.html index.html index.htm index.php index.jsp index.asp index.aspx;
59+
root /mnt/gopath/src/yougam;
60+
61+
set $ip $http_x_forwarded_for;
62+
63+
if ($ip ~ ^$ ){
64+
set $ip $remote_addr;
65+
}
66+
proxy_set_header X-Forwarded-For "$ip, $server_addr";
67+
68+
location ~ ^/(business|css|font|fonts|img|js|libs|music|root|video)/ {
69+
if ($query_string){
70+
expires max;
71+
}
72+
root /mnt/gopath/src/yougam/public;
73+
break;
74+
}
75+
76+
location ~ ^/(captcha|user|search|accept|ignore|new|edit|delete|view|close|open|like|hate|core|root)/ {
77+
proxy_pass http://localhost:8000;
78+
break;
79+
}
80+
81+
location / {
82+
proxy_pass http://localhost:8000;
83+
break;
84+
}
85+
}
86+
87+
#server end
88+
89+
# another virtual host using mix of IP-, name-, and port-based configuration
90+
#
91+
#server {
92+
# listen 4000;
93+
# listen somename:8080;
94+
# server_name somename alias another.alias;
95+
96+
# location / {
97+
# root html;
98+
# index index.html index.htm;
99+
# }
100+
#}
101+
102+
103+
# HTTPS server
104+
#
105+
#server {
106+
# listen 443;
107+
# server_name localhost;
108+
109+
# ssl on;
110+
# ssl_certificate cert.pem;
111+
# ssl_certificate_key cert.key;
112+
113+
# ssl_session_timeout 5m;
114+
115+
# ssl_protocols SSLv2 SSLv3 TLSv1;
116+
# ssl_ciphers HIGH:!aNULL:!MD5;
117+
# ssl_prefer_server_ciphers on;
118+
119+
# location / {
120+
# root html;
121+
# index index.html index.htm;
122+
# }
123+
#}
124+
125+
}

conf/supervisor.conf

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[program:yougam]
2+
command=/mnt/gopath/src/yougam/yougam 0.0.0.0 8000 true ; 被监控的进程路径
3+
numprocs=1 ; 启动几个进程
4+
directory=/mnt/gopath/src/yougam ; 执行前要不要先cd到目录去,一般不用
5+
autostart=true ; 随着supervisord的启动而启动
6+
autorestart=true ; 自动重启。。当然要选上了
7+
startretries=10 ; 启动失败时的最多重试次数
8+
exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
9+
stopsignal=KILL ; 用来杀死进程的信号
10+
stopwaitsecs=10 ; 发送SIGKILL前的等待时间
11+
redirect_stderr=true ; 重定向stderr到stdout
12+
13+
[program:nginx]
14+
command=/usr/local/nginx/sbin/nginx ; 被监控的进程路径
15+
numprocs=1 ; 启动几个进程
16+
directory=/usr/local/nginx/sbin ; 执行前要不要先cd到目录去,一般不用
17+
autostart=true ; 随着supervisord的启动而启动
18+
autorestart=true ; 自动重启。。当然要选上了
19+
startretries=10 ; 启动失败时的最多重试次数
20+
exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
21+
stopsignal=KILL ; 用来杀死进程的信号
22+
stopwaitsecs=10 ; 发送SIGKILL前的等待时间
23+
redirect_stderr=true ; 重定向stderr到stdout
24+

0 commit comments

Comments
 (0)