1
0
forked from x/ContextOS

opt const

This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-04-23 12:08:03 +08:00
parent ea16ebfda7
commit b372525231
15 changed files with 1 additions and 703 deletions

View File

@ -1,411 +0,0 @@
[
[[
bc
expr
test
true
false
printf
clear
echo
time
flock
getopt
script
scriptreplay
usleep
sleep
timeout
nohup
xargs
tee
env
printenv
tty
stty
busybox
add-shell
remove-shell
ash
sh
ps
top
watch
pidof
pstree
renice
nice
setsid
setuidgid
kill
pkill
pgrep
killall
killall5
free
lsof
fuser
ls
ln
cp
mv
rm
rmdir
mkdir
mknod
mktemp
mkfifo
touch
truncate
link
unlink
readlink
stat
pwd
dirname
basename
vi
ed
tr
wc
od
seq
factor
cat
tac
rev
cut
sed
awk
cmp
comm
head
tail
more
less
sort
diff
fold
uniq
paste
split
ascii
expand
unexpand
xxd
hexdump
hexedit
strings
patch
sum
crc32
base32
base64
md5sum
sha1sum
sha3sum
sha256sum
sha512sum
uudecode
uuencode
dos2unix
unix2dos
df
du
dd
hd
cpio
find
grep
egrep
fgrep
fsync
cksum
eject
mount
umount
mountpoint
findfs
mkdosfs
fdisk
mke2fs
fsck
fsfreeze
fsck.minix
freeramdisk
mkfs.ext2
mkfs.minix
mkfs.vfat
chattr
iostat
xz
xzcat
bzcat
zcat
unzip
bzip2
bunzip2
gunzip
gzip
unxz
arch
tar
ar
ifconfig
ifdown
ifup
arp
arping
ping
ping6
traceroute
traceroute6
route
ntpd
dnsd
dnsdomainname
nslookup
ipaddr
ip
nc
netstat
hostname
telnetd
telnet
whois
tftp
tftpd
ftpd
ftpget
ftpput
wget
blkdiscard
blkid
chat
blockdev
id
adduser
addgroup
delgroup
deluser
passwd
chpasswd
whoami
groups
users
su
w
who
last
login
logname
sendmail
mesg
chown
chgrp
chmod
getty
beep
init
halt
reboot
runlevel
adjtimex
hwclock
uptime
logger
dmesg
syslogd
sysctl
chroot
crond
crontab
lsmod
rmmod
insmod
depmod
modinfo
modprobe
cal
date
uname
which
man
acpid
bootchartd
brctl
chpst
chrt
chvt
conspy
cryptpw
cttyhack
dc
deallocvt
devmem
dhcprelay
dpkg
dpkg-deb
dumpkmap
dumpleases
envdir
envuidgid
ether-wake
fakeidentd
fallocate
fatattr
fbset
fbsplash
fdflush
fdformat
fgconsole
fstrim
getconf
hdparm
hostid
httpd
hush
i2cdetect
i2cdump
i2cget
i2cset
i2ctransfer
ifenslave
ifplugd
inetd
install
ionice
ipcalc
ipcrm
ipcs
iplink
ipneigh
iproute
iprule
iptunnel
kbd_mode
klogd
linux32
linux64
linuxrc
loadfont
loadkmap
logread
losetup
lpd
lpq
lpr
lsattr
lspci
lsscsi
lsusb
lzcat
lzma
lzop
makedevs
makemime
mdev
microcom
mim
mkpasswd
mkswap
mpstat
mt
nameif
nanddump
nandwrite
nbd-client
nl
nmeter
nologin
nproc
nsenter
openvt
partprobe
pipe_progress
pivot_root
pmap
popmaildir
poweroff
powertop
pscan
pwdx
raidautorun
rdate
rdev
readahead
readprofile
realpath
reformime
reset
resize
resume
rpm
rpm2cpio
rtcwake
run-init
run-parts
runsv
runsvdir
rx
setarch
setconsole
setfattr
setfont
setkeycodes
setlogcons
setpriv
setserial
showkey
shred
shuf
slattach
smemcap
softlimit
ssl_client
start-stop-daemon
sulogin
sv
svc
svlogd
svok
swapoff
swapon
switch_root
sync
taskset
tc
tcpsvd
ts
ttysize
tunctl
ubiattach
ubidetach
ubimkvol
ubirename
ubirmvol
ubirsvol
ubiupdatevol
udhcpc
udhcpc6
udhcpd
udpsvd
uevent
unlzma
unshare
vconfig
vlock
volname
wall
watchdog
yes
zcip

View File

@ -1,22 +0,0 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
function degToRad(n) { return n * 2 * Math.PI / 360 }
function drawFill(ctx, cb) { ctx.beginPath(), cb(), ctx.fill() }
var ctx = can.page.Append(can, can._output, [{type: html.CANVAS, height: can.ConfHeight(), width: can.ConfWidth()}])._target.getContext("2d")
drawFill(ctx, function() {
ctx.strokeStyle = "red"
ctx.fillStyle = "green"
ctx.lineWidth = 2
ctx.fillRect(0, 0, 200, 200)
ctx.moveTo(200, 200), ctx.arc(200, 200, 100, degToRad(-45), degToRad(90), false), ctx.lineTo(200, 200)
can.misc.Debug("what", 123)
ctx.strokeStyle = "white"
ctx.lineWidth = 2
ctx.font = "36px arial"
ctx.strokeText("Canvas text", 50, 50)
ctx.fillStyle = "red"
ctx.font = "48px georgia"
ctx.fillText("Canvas text", 50, 150)
})
}})

View File

@ -1,8 +0,0 @@
#!/bin/sh
show() {
echo "$SHELL $TERM $PWD $HOME"
echo "hello world $content $@"
ish_sys_path_list
}
show

View File

@ -1,3 +0,0 @@
p {
color: red;
}

View File

@ -1,26 +0,0 @@
package hi
import (
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/ctx"
)
type hi struct {
ice.Zone
list string `name:"list zone id auto insert" help:"示例"`
}
func (s hi) Show(m *ice.Message, arg ...string) {
m.Echo("hello world").StatusTime()
}
func (s hi) List(m *ice.Message, arg ...string) {
// ctx.Display(m, "hi.js")
// ctx.Display(m, "/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js")
// ctx.Display(m, "http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js")
ctx.Display(m, "https://shylinux.com/x/contexts@v2.9.2/src/hi/hi.js?content=what")
s.Zone.ListPage(m, arg...)
}
func init() { ice.Cmd("web.code.hi.hi", hi{}) }

View File

@ -1,125 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="hi.css">
<style>
h1 {
background-color:red;
}
</style>
</head>
<body>
<input type="search"/>
<input type="url"/>
<input type="tel"/>
<input type="email"/>
<input type="number"/>
<input type="range"/>
<input type="color"/>
<input type="date"/>
<input type="time"/>
<input type="month"/>
<input type="week"/>
<script>
console.log("hello world")
</script>
<h1>hello world</h1>
<h2>hello world</h2>
<h3>hello world</h3>
<h4>hello world</h4>
<h5>hello "'&world</h5>
<h6>hello world</h6>
<p>hello world</p>
<em>hello world</em>
<strong>hello world</strong>
<i>hello world</i>
<u>hello world</u>
<b>hello world</b>
<a href="https://baidu.com">baidu</a>
<a href="mailto:shylinux@163.com?subject=hi&body=hello">contacts</a>
<ul>
<li> 1 </li>
<li> 1 </li>
<li> 1 </li>
</ul>
<ol>
<li> 1 </li>
<li> 1 </li>
<li> 1 </li>
</ol>
<blockquote>hello world</blockquote>
<q>hello world</q>
<cite>hello world</cite>
<abbr>hello world</abbr>
<pre><code>
package main
func init() {
println("hello world")
}
</code></pre>
<var>msg</var><kbd>Ctrl+V</kbd>
<samp>hello world <samp>
<!--
<video muted autoplay loop controls>
<source src="http://localhost:9020/share/local/usr/local/image/2c45934eb729ba756771d26a118ec4b8.mp4"/>
</video>
-->
<samp>hello world <samp>
<iframe src="http://localhost:9020" width="100%" height="400px" style="border:none"></iframe>
<svg width="100%" height="200">
<rect width="100%" height="100%" fill="green" />
<circle x="%50" y="50%" r="50%" fill="red" />
</svg>
<table>
<colgroup>
<col style="background-color:red" span="2"></col>
<col style="background-color:blue" span="2"></col>
</colgroup>
<tr>
<th colspan="2" rowspan="2">he</th>
<th colspan="2">hi</th>
<th>he</th>
</tr>
<tr>
<td>he</td>
<td>he</td>
<td>he</td>
</tr>
<tr>
<td rowspan="2">hi</td>
<td>hi</td>
<td>he</td>
<td>he</td>
<td>he</td>
</tr>
<tr>
<td>hi</td>
<td>he</td>
<td>he</td>
<td>he</td>
</tr>
</table>
<div style="display:flex;width:100%">
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
<div style="flex:1">one</div>
</div>
</body>
</html>

View File

@ -1,8 +0,0 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
msg.Defer(function() { msg.Dump() })
msg.Echo("hello world\n"+(can.Conf("content")||""))
can.require(["he.js"], function() { }, function() { })
// can.require(["/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
// can.require(["http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
// can.require(["https://shylinux.com/x/contexts@v2.9.2/src/hi/he.js?content=what"], function() { }, function() { })
}})

View File

@ -1,2 +0,0 @@
print "hello world"
print "hello world"

View File

@ -1,10 +0,0 @@
#!/bin/sh
echo "$ISH_CTX_SCRIPT <= $ISH_CTX_MODULE"
echo "$TERM $PWD $HOME $PATH"
echo "hello world $content $@"
require "he.sh?content=what" nice
require "/require/shylinux.com/x/contexts@v2.9.3/src/hi/he.sh"
require "http://192.168.10.8:9020/x/contexts@v2.9.3/src/hi/he.sh"
# require "https://shylinux.com/x/contexts@v2.9.3/src/hi/he.sh?content=what"

View File

@ -1,27 +0,0 @@
chapter "hi"
chain `
contexts
volcanos
volcanos
lib
page
panel
publish
icebergs
base
core
misc
toolkits
` ship.stroke-width 1 line.stroke-width 1
chart sequence `
fe be os hd
0 call 1 some 3
0 call 1 some 3
0 call 1 some 3
0 call 1 some 3
0 call 1 some 3
` marginx 80
field cli.system

View File

@ -1,20 +0,0 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
function appends(list) { can.core.Item(list, function(key, list) { can.core.Item(list, function(size, value) {
can.page.Append(can, can._output, [{view: html.IMG, style: {
"background": "url(/publish/icon/full.jpg)", "background-size": size*20+"px", height:size, width: size,
"background-repeat": "no-repeat", "background-position-x": -value[0]+"px", "background-position-y": -value[1]+"px",
border: "lightgray solid 1px", margin: "2px", float: "left",
}}])
}), can.page.Append(can, can._output, [{type: "br", style: {"clear": "both"}}]) }) }
appends({
close: {16: [82, 158], 18: [93, 177], 20: [103, 197], 24: [123, 236]},
create: {16: [27, 158], 18: [30, 177], 20: [33, 197], 24: [40, 236]},
refresh: {16: [194, 241], 18: [218, 271], 20: [242, 301], 24: [291, 362]},
back: {16: [27, 185], 18: [30, 208], 20: [33, 232], 24: [40, 278]},
"goto": {16: [82, 185], 18: [92, 208], 20: [102, 232], 24: [123, 278]},
})
can.page.Append(can, can._output, [{text: "\u2715", style: {"font-size": "24px"}}])
can.page.Append(can, can._output, [{view: html.IMG, style: {"background": "url(/publish/icon/full.jpg)", "background-size": "480px", height: 1290, width: 480}}])
can.sup.onimport.size(can.sup, can.ConfHeight()+html.ACTION_HEIGHT, can.sup.ConfWidth(480)), can.sup.onexport.output(can.sup, msg)
}})

View File

@ -1,18 +0,0 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
can.onappend.layout(can, can._output, html.FLEX, [
{view: ["hi", html.DIV, "project"]}, [
[
{view: ["hi", html.DIV, "content"]},
{view: ["he", html.DIV, "profile"]},
],
{view: ["he", html.DIV, "display"]},
],
]).layout(can.ConfWidth(), can.ConfHeight())
can.onmotion.clear(can, can._output)
var list = [
{name: "h1", list: [{view: ["h1", html.DIV, "h1111"]}]},
{name: "h2", list: [{view: ["h1", html.DIV, "h222"]}]},
{name: "h3", list: [{view: ["h1", html.DIV, "h3333"]}]},
]
can.onappend.layout(can, can._output, "tabs-bottom", list)
}})

View File

@ -48,24 +48,3 @@ field "趋势图" web.code.git.trend args `intshell`
field "架构图" web.code.git.spide args `intshell`
spark README.md
source h3/h3.shy
source h4/h4.shy
source h5/h5.shy
source h6/h6.shy
source h7/h7.shy
source h8/h8.shy
source h3/h3.shy
source h4/h4.shy
source h5/h5.shy
source h6/h6.shy
source h7/h7.shy
source h8/h8.shy
source h9/h9.shy
source h10/h10.shy
source h3/h3.shy
source h4/h4.shy
source h5/h5.shy
source h6/h6.shy
source h7/h7.shy
source h3/h3.shy
source h5/h5.shy

View File

@ -5,7 +5,6 @@ go 1.11
require (
shylinux.com/x/golang-story v0.5.9
shylinux.com/x/linux-story v0.5.5
shylinux.com/x/mysql-story v0.5.8
shylinux.com/x/nginx-story v0.5.8
shylinux.com/x/redis-story v0.5.9
)

View File

@ -1,6 +1,6 @@
src/binpack.go
src/version.go
etc/
etc/local.shy
bin/
var/
usr/