This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-07-24 12:27:13 +08:00
commit 64628cdf6e
11 changed files with 114 additions and 0 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 shylinux
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
binarys = bin/ice.bin
version = src/version.go
binpack = src/binpack.go
flags = -ldflags "-w -s" -v
all: def
@date +"%Y-%m-%d %H:%M:%S"
go build ${flags} -o ${binarys} src/main.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null
def:
@[ -f ${version} ] || echo "package main">${version}
@[ -f ${binpack} ] || echo "package main">${binpack}

19
README.md Normal file
View File

@ -0,0 +1,19 @@
# Contexts
Contexts 通过模块化、集群化、自动化的方式,只用一个 20M 大小的程序文件,就可以在各种设备上,一键启动完整的云计算服务与云研发环境。
## 源码安装
### 克隆编译
```sh
git clone https://shylinux.com/x/contexts
cd contexts; source etc/miss.sh
```
### 启动服务
```sh
ish_miss_serve
```
### 访问网页
```sh
open http://localhost:9020
```

1
etc/exit.shy Normal file
View File

@ -0,0 +1 @@
~ssh

2
etc/init.shy Normal file
View File

@ -0,0 +1,2 @@
~ssh
source local.shy

15
etc/miss.sh Normal file
View File

@ -0,0 +1,15 @@
#! /bin/sh
export ctx_shy=${ctx_shy:=https://shylinux.com}
if [ -f $PWD/.ish/plug.sh ]; then source $PWD/.ish/plug.sh; elif [ -f $HOME/.ish/plug.sh ]; then source $HOME/.ish/plug.sh; else
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_shy; else wget -O $temp -q $ctx_shy; fi; source $temp intshell
fi; require conf.sh; require miss.sh
ish_miss_prepare_compile
ish_miss_prepare_develop
ish_miss_prepare_project
ish_miss_prepare_contexts
ish_miss_prepare_resource
ish_miss_make; [ -z "$*" ] || ish_miss_serve "$@"

5
go.mod Normal file
View File

@ -0,0 +1,5 @@
module 2024-contexts.shylinux.com/x/education
go 1.13
require shylinux.com/x/ice v1.5.40 // indirect

13
go.sum Normal file
View File

@ -0,0 +1,13 @@
shylinux.com/x/go-git/v5 v5.6.7 h1:WD5QSco7m3QooPCgdvQ6/GyGIFPun8C+hex5N41LYlk=
shylinux.com/x/go-git/v5 v5.6.7/go.mod h1:Qb0lA+uIrofZg8NQerhYcJHgGWixFqvS6p3aJ/L5Nlk=
shylinux.com/x/go-qrcode v0.0.3 h1:RMo+Vidbgq3HatLBj7DDXcTbTLFUwzis5K7TqBkD38U=
shylinux.com/x/go-qrcode v0.0.3/go.mod h1:KAbtU+KwiiABMZ/CJ0zh9PI2AX82Uf9rRYcQ4ODm4po=
shylinux.com/x/ice v1.5.40 h1:OC++Fb1CxOU1R0Vlrfm+J9pf1mg5uH1n1trXFIHQHaw=
shylinux.com/x/ice v1.5.40/go.mod h1:nYLBfYfOacaxvIRgD4ryknBJTqUIZD0zkV72it7iHqU=
shylinux.com/x/icebergs v1.9.38 h1:LS4n8KE3qV8uvdpWwnrgStgkU90f6Ww6prSpv7Eztyw=
shylinux.com/x/icebergs v1.9.38/go.mod h1:zLsVvLKuFEyFRwKoa3li75nSqbJo/GVIYacAQVdTsxA=
shylinux.com/x/toolkits v0.7.10/go.mod h1:CHDJarGlDkg60kVsvMLYL/a5hAnRLEOShiEsMOuEp0Q=
shylinux.com/x/toolkits v1.0.12 h1:dwskBNtOLBfis1XtjEGfJhrjBXiwga3M/wNCERsXsyo=
shylinux.com/x/toolkits v1.0.12/go.mod h1:CHDJarGlDkg60kVsvMLYL/a5hAnRLEOShiEsMOuEp0Q=
shylinux.com/x/websocket v0.0.4 h1:AJpwblePoOpiE6C8NrvgNYpKTotXMLrDDX2chTvx44Q=
shylinux.com/x/websocket v0.0.4/go.mod h1:3UGWkjTu3ie5NAZen7J+uLPBrO7DFeKloj6Jxo13Oiw=

15
src/hi/hi.go Normal file
View File

@ -0,0 +1,15 @@
package hi
import "shylinux.com/x/ice"
type hi struct {
ice.Hash
list string `name:"list hash auto" help:"hi"`
}
func (s hi) List(m *ice.Message, arg ...string) {
s.Hash.List(m, arg...)
}
func init() { ice.Cmd("web.chat.hi.hi", hi{}) }

10
src/main.go Normal file
View File

@ -0,0 +1,10 @@
package main
import (
_ "2024-contexts.shylinux.com/x/education/src/hi"
"shylinux.com/x/ice"
)
func main() { print(ice.Run()) }
func init() { ice.Info.Titles = "ContextOS" }

1
src/main.shy Normal file
View File

@ -0,0 +1 @@
title "20240724-education"