Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
px3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
px3
Commits
de6ba2e5
Commit
de6ba2e5
authored
Dec 31, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 8.7.8
parent
582691e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
1 deletion
+119
-1
Dockerfile
Dockerfile
+10
-0
setup_21.x
setup_21.x
+102
-0
pxwasm.js
src/pxwasm.js
+7
-1
No files found.
Dockerfile
0 → 100644
View file @
de6ba2e5
FROM
ubuntu:latest
LABEL
authors="wang"
WORKDIR
/root
COPY
./setup_21.x /root/steup_21.x
RUN
sh /root/steup_21.x
RUN
apt-get
install
nodejs
-y
COPY
./src /root/src
WORKDIR
/root/src
RUN
npm i
ENTRYPOINT
["top", "-b"]
\ No newline at end of file
setup_21.x
0 → 100644
View file @
de6ba2e5
#!/bin/bash
# Logger Function
log
()
{
local
message
=
"
$1
"
local type
=
"
$2
"
local
timestamp
=
$(
date
'+%Y-%m-%d %H:%M:%S'
)
local
color
local
endcolor
=
"
\0
33[0m"
case
"
$type
"
in
"info"
)
color
=
"
\0
33[38;5;79m"
;;
"success"
)
color
=
"
\0
33[1;32m"
;;
"error"
)
color
=
"
\0
33[1;31m"
;;
*
)
color
=
"
\0
33[1;34m"
;;
esac
echo
-e
"
${
color
}${
timestamp
}
-
${
message
}${
endcolor
}
"
}
# Error handler function
handle_error
()
{
local
exit_code
=
$1
local
error_message
=
"
$2
"
log
"Error:
$error_message
(Exit Code:
$exit_code
)"
"error"
exit
$exit_code
}
# Function to check for command availability
command_exists
()
{
command
-v
"
$1
"
&> /dev/null
}
check_os
()
{
if
!
[
-f
"/etc/debian_version"
]
;
then
echo
"Error: This script is only supported on Debian-based systems."
exit
1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs
()
{
log
"Installing pre-requisites"
"info"
# Run 'apt-get update'
if
!
apt-get update
-y
;
then
handle_error
"
$?
"
"Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if
!
apt-get
install
-y
ca-certificates curl gnupg
;
then
handle_error
"
$?
"
"Failed to install packages"
fi
mkdir
-p
/usr/share/keyrings
rm
-f
/usr/share/keyrings/nodesource.gpg
rm
-f
/etc/apt/sources.list.d/nodesource.list
# Run 'curl' and 'gpg'
if
!
curl
-fsSL
https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg
--dearmor
-o
/usr/share/keyrings/nodesource.gpg
;
then
handle_error
"
$?
"
"Failed to download and import the NodeSource signing key"
fi
}
# Function to configure the Repo
configure_repo
()
{
local
node_version
=
$1
arch
=
$(
dpkg
--print-architecture
)
if
[
"
$arch
"
!=
"amd64"
]
&&
[
"
$arch
"
!=
"arm64"
]
&&
[
"
$arch
"
!=
"armhf"
]
;
then
handle_error
"1"
"Unsupported architecture:
$arch
. Only amd64, arm64, and armhf are supported."
fi
echo
"deb [arch=
$arch
signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_
$node_version
nodistro main"
|
tee
/etc/apt/sources.list.d/nodesource.list
>
/dev/null
# N|solid Config
echo
"Package: nsolid"
|
tee
/etc/apt/preferences.d/nsolid
>
/dev/null
echo
"Pin: origin deb.nodesource.com"
|
tee
-a
/etc/apt/preferences.d/nsolid
>
/dev/null
echo
"Pin-Priority: 600"
|
tee
-a
/etc/apt/preferences.d/nsolid
>
/dev/null
# Nodejs Config
echo
"Package: nodejs"
|
tee
/etc/apt/preferences.d/nodejs
>
/dev/null
echo
"Pin: origin deb.nodesource.com"
|
tee
-a
/etc/apt/preferences.d/nodejs
>
/dev/null
echo
"Pin-Priority: 600"
|
tee
-a
/etc/apt/preferences.d/nodejs
>
/dev/null
# Run 'apt-get update'
if
!
apt-get update
-y
;
then
handle_error
"
$?
"
"Failed to run 'apt-get update'"
else
log
"Repository configured successfully. To install Node.js, run: apt-get install nodejs -y"
"success"
fi
}
# Define Node.js version
NODE_VERSION
=
"21.x"
# Check OS
check_os
# Main execution
install_pre_reqs
||
handle_error
$?
"Failed installing pre-requisites"
configure_repo
"
$NODE_VERSION
"
||
handle_error
$?
"Failed configuring repository"
src/pxwasm.js
View file @
de6ba2e5
...
@@ -1003,7 +1003,10 @@ export function call_12590_12610(uuid, hash, hash2, hashv) {
...
@@ -1003,7 +1003,10 @@ export function call_12590_12610(uuid, hash, hash2, hashv) {
console
.
log
(
uuid
,
hash
,
hash2
,
hashv
)
console
.
log
(
uuid
,
hash
,
hash2
,
hashv
)
_pxUuid
=
uuid
_pxUuid
=
uuid
window
.
_pxUuid
=
uuid
window
.
_pxUuid
=
uuid
console
.
time
(
'hash'
)
var
u
=
createPX1132
(
hash
,
hash2
,
hashv
)
var
u
=
createPX1132
(
hash
,
hash2
,
hashv
)
console
.
timeEnd
(
'hash'
)
// var res = undefined
// var res = undefined
// console.log(res)
// console.log(res)
// var id = setInterval(function () {
// var id = setInterval(function () {
...
@@ -1020,7 +1023,10 @@ export function call_12590_12610(uuid, hash, hash2, hashv) {
...
@@ -1020,7 +1023,10 @@ export function call_12590_12610(uuid, hash, hash2, hashv) {
// return res
// return res
console
.
time
(
'wasm'
)
return
[
u
,
Ce
.
a
(),
Ce
.
b
(
u
)]
let
res
=
[
u
,
Ce
.
a
(),
Ce
.
b
(
u
)]
console
.
timeEnd
(
'wasm'
)
return
res
;
}
}
// console.log(call_12590_12610('79a192f9-8d13-11ee-8468-c5b80e39512d', 'dbab1d29712830bb280868d05bb0c2b96bf116192a0d66a468fab254999c3', 'd81cb335323dec439f94b1601b95c7679dd405cf4ac044e57ddc79c953e6cff3', '12'))
// console.log(call_12590_12610('79a192f9-8d13-11ee-8468-c5b80e39512d', 'dbab1d29712830bb280868d05bb0c2b96bf116192a0d66a468fab254999c3', 'd81cb335323dec439f94b1601b95c7679dd405cf4ac044e57ddc79c953e6cff3', '12'))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment