Skip to content

Commit 938b6d5

Browse files
committed
Italian Promises and Letter Trails.
1 parent efd36e0 commit 938b6d5

8 files changed

Lines changed: 339 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
# ═══════════════════════════════════════════════════════════════════════════════
3+
# Defined™ — Check MySQL Database (macOS)
4+
# In memory of Steve Jobs. Think Different.
5+
# NitroWebExpress™ — MEARVK LLC
6+
# ═══════════════════════════════════════════════════════════════════════════════
7+
set -e
8+
9+
echo ""
10+
echo "╔═══════════════════════════════════════════════════════════════════════╗"
11+
echo "║ Defined™ — Check Database (macOS) ║"
12+
echo "║ In memory of Steve Jobs. ║"
13+
echo "╚═══════════════════════════════════════════════════════════════════════╝"
14+
echo ""
15+
16+
if ! command -v mysql &>/dev/null; then
17+
echo " [!] MySQL client not found."
18+
echo " Install: brew install mysql"
19+
exit 1
20+
fi
21+
22+
echo " [*] Checking database 'defined_dark_gray'..."
23+
if mysql -u root -e "SELECT 1" -D defined_dark_gray &>/dev/null; then
24+
echo " [OK] Database 'defined_dark_gray' exists and is accessible."
25+
else
26+
echo " [--] Database not found or not accessible."
27+
echo " Run: bash sql/install.sh"
28+
fi
29+
echo ""
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
# ═══════════════════════════════════════════════════════════════════════════════
3+
# Defined™ — Install & Deploy (macOS)
4+
# Theme: Dark Gray — Definition to Narrow Cause
5+
#
6+
# In memory of Steve Jobs, whose vision for personal computing
7+
# and elegant design continues to inspire. The Mac is a beautiful
8+
# machine for beautiful work.
9+
#
10+
# NitroWebExpress™ — MEARVK LLC
11+
# Installer Tech ID: Max Rupplin
12+
# ═══════════════════════════════════════════════════════════════════════════════
13+
set -e
14+
15+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
16+
MOD_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
17+
NWE_ROOT="$(cd "$MOD_ROOT/../.." && pwd)"
18+
TOMCAT_HOME="${1:-${CATALINA_HOME:-/usr/local/opt/tomcat/libexec}}"
19+
[ ! -d "$TOMCAT_HOME/webapps" ] && TOMCAT_HOME="/opt/homebrew/opt/tomcat/libexec"
20+
WEBAPP_SRC="$MOD_ROOT/servlets/servlet/src/main/webapp"
21+
DEPLOY_DIR="$TOMCAT_HOME/webapps/defined"
22+
23+
echo ""
24+
echo "╔═══════════════════════════════════════════════════════════════════════╗"
25+
echo "║ Defined™ — Deploy Local (macOS) ║"
26+
echo "║ Theme: Dark Gray ║"
27+
echo "║ ║"
28+
echo "║ In memory of Steve Jobs — Think Different. ║"
29+
echo "║ The Mac: a beautiful machine for beautiful work. ║"
30+
echo "╚═══════════════════════════════════════════════════════════════════════╝"
31+
echo ""
32+
33+
if [ ! -d "$TOMCAT_HOME/webapps" ]; then
34+
echo " [!] Tomcat not found at: $TOMCAT_HOME"
35+
echo " Install: brew install tomcat"
36+
echo " Or set CATALINA_HOME"
37+
exit 1
38+
fi
39+
40+
echo " [*] Target: $DEPLOY_DIR"
41+
echo " [*] Cleaning previous deployment..."
42+
rm -rf "$DEPLOY_DIR"
43+
mkdir -p "$DEPLOY_DIR/WEB-INF/lib"
44+
45+
echo " [*] Copying webapp files..."
46+
cp -R "$WEBAPP_SRC/"* "$DEPLOY_DIR/"
47+
48+
# Locate MySQL JDBC connector
49+
JDBC_JAR=$(find "$NWE_ROOT/jars/mysql" -name "mysql-connector-j-*.jar" 2>/dev/null | head -1)
50+
if [ -n "$JDBC_JAR" ]; then
51+
cp "$JDBC_JAR" "$DEPLOY_DIR/WEB-INF/lib/"
52+
echo " [*] JDBC connector: copied"
53+
else
54+
echo " [!] WARNING: mysql-connector-j not found"
55+
fi
56+
57+
echo ""
58+
echo " [OK] Deployed successfully."
59+
echo " URL: http://localhost:8080/defined/"
60+
echo ""
61+
echo "╔═══════════════════════════════════════════════════════════════════════╗"
62+
echo "║ Defined™ is ready on macOS. ║"
63+
echo "║ Port 49220 (AI Server) / Port 49221 (Protocol Backend) ║"
64+
echo "║ Thank you, Steve Jobs. Think Different. ║"
65+
echo "╚═══════════════════════════════════════════════════════════════════════╝"
66+
echo ""
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# ═══════════════════════════════════════════════════════════════════════════════
3+
# Defined™ — Test JDBC Connectivity (macOS)
4+
# In memory of Steve Jobs. Think Different.
5+
# NitroWebExpress™ — MEARVK LLC
6+
# ═══════════════════════════════════════════════════════════════════════════════
7+
set -e
8+
9+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10+
NWE_ROOT="$(cd "$SCRIPT_DIR/../../../../.." && pwd)"
11+
12+
echo ""
13+
echo "╔═══════════════════════════════════════════════════════════════════════╗"
14+
echo "║ Defined™ — Test JDBC (macOS) ║"
15+
echo "║ In memory of Steve Jobs. ║"
16+
echo "╚═══════════════════════════════════════════════════════════════════════╝"
17+
echo ""
18+
19+
JDBC_JAR=$(find "$NWE_ROOT/jars/mysql" -name "mysql-connector-j-*.jar" 2>/dev/null | head -1)
20+
21+
if [ -z "$JDBC_JAR" ]; then
22+
echo " [FAIL] MySQL JDBC connector not found."
23+
exit 1
24+
fi
25+
26+
echo " [*] JDBC jar: $JDBC_JAR"
27+
echo " [*] Testing connection..."
28+
29+
java -cp "$JDBC_JAR:." -e 'Class.forName("com.mysql.cj.jdbc.Driver");' 2>/dev/null && \
30+
echo " [OK] JDBC driver loads." || \
31+
echo " [--] Could not verify JDBC load."
32+
echo ""
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
# ═══════════════════════════════════════════════════════════════════════════════
3+
# Defined™ — Test Local Deployment (macOS)
4+
# In memory of Steve Jobs. Think Different.
5+
# NitroWebExpress™ — MEARVK LLC
6+
# ═══════════════════════════════════════════════════════════════════════════════
7+
8+
echo ""
9+
echo "╔═══════════════════════════════════════════════════════════════════════╗"
10+
echo "║ Defined™ — Test Local (macOS) ║"
11+
echo "║ In memory of Steve Jobs. ║"
12+
echo "╚═══════════════════════════════════════════════════════════════════════╝"
13+
echo ""
14+
15+
echo " [*] Testing Tomcat webapp at /defined/..."
16+
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/defined/ 2>/dev/null || echo "000")
17+
echo " HTTP $HTTP_CODE"
18+
19+
echo " [*] Testing AI server on port 49220..."
20+
if timeout 2 bash -c "echo >/dev/tcp/localhost/49220" 2>/dev/null; then
21+
echo " [OK] Port 49220 is UP"
22+
else
23+
echo " [--] Port 49220 is DOWN"
24+
fi
25+
26+
echo " [*] Testing protocol backend on port 49221..."
27+
if timeout 2 bash -c "echo >/dev/tcp/localhost/49221" 2>/dev/null; then
28+
echo " [OK] Port 49221 is UP"
29+
else
30+
echo " [--] Port 49221 is DOWN"
31+
fi
32+
33+
echo ""
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@echo off
2+
REM ═══════════════════════════════════════════════════════════════════════════════
3+
REM Defined™ — Check MySQL Database (Microsoft Windows)
4+
REM
5+
REM A soft welcome to Microsoft Software and the Windows platform.
6+
REM With thanks to Dave Plummer. Courtesy to Bill Gates and Melinda.
7+
REM
8+
REM NitroWebExpress™ — MEARVK LLC
9+
REM ═══════════════════════════════════════════════════════════════════════════════
10+
setlocal
11+
12+
echo.
13+
echo ╔═══════════════════════════════════════════════════════════════════════╗
14+
echo ║ Defined™ — Check Database (Windows) ║
15+
echo ║ Welcome, Microsoft. Thanks to Dave Plummer. ║
16+
echo ╚═══════════════════════════════════════════════════════════════════════╝
17+
echo.
18+
19+
set MYSQL=mysql
20+
where mysql >nul 2>&1
21+
if %ERRORLEVEL% neq 0 (
22+
echo [!] MySQL client not found in PATH.
23+
echo Install: https://dev.mysql.com/downloads/installer/
24+
pause & exit /b 1
25+
)
26+
27+
echo [*] Checking database 'defined_dark_gray'...
28+
%MYSQL% -u root -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='defined_dark_gray';" 2>nul | findstr /i "defined_dark_gray" >nul
29+
if %ERRORLEVEL% equ 0 (
30+
echo [OK] Database 'defined_dark_gray' exists.
31+
) else (
32+
echo [--] Database not found. Run sql\install.sh or create manually.
33+
)
34+
35+
echo.
36+
pause
37+
endlocal
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@echo off
2+
REM ═══════════════════════════════════════════════════════════════════════════════
3+
REM Defined™ — Install & Deploy (Microsoft Windows)
4+
REM Theme: Dark Gray — Definition to Narrow Cause
5+
REM
6+
REM A soft welcome to Microsoft Software and the Windows platform.
7+
REM With thanks to Dave Plummer for your install series and contributions
8+
REM to the Windows operating system. Courtesy to Bill Gates and his wife
9+
REM Melinda for their vision and philanthropy.
10+
REM
11+
REM NitroWebExpress™ — MEARVK LLC
12+
REM Installer Tech ID: Max Rupplin
13+
REM ═══════════════════════════════════════════════════════════════════════════════
14+
setlocal
15+
16+
set SCRIPT_DIR=%~dp0
17+
set MOD_ROOT=%SCRIPT_DIR%..\..
18+
set NWE_ROOT=%SCRIPT_DIR%..\..\..\..\..
19+
set TOMCAT_HOME=%1
20+
if "%TOMCAT_HOME%"=="" set TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 10.1
21+
set WEBAPP_SRC=%MOD_ROOT%\servlets\servlet\src\main\webapp
22+
set DEPLOY_DIR=%TOMCAT_HOME%\webapps\defined
23+
24+
echo.
25+
echo ╔═══════════════════════════════════════════════════════════════════════╗
26+
echo ║ Defined™ — Deploy Local (Windows) ║
27+
echo ║ Theme: Dark Gray ║
28+
echo ║ ║
29+
echo ║ Welcome, Microsoft Windows. ║
30+
echo ║ With thanks to Dave Plummer for his contributions to this platform. ║
31+
echo ║ Courtesy to Bill Gates and his wife Melinda. ║
32+
echo ╚═══════════════════════════════════════════════════════════════════════╝
33+
echo.
34+
echo Target: %DEPLOY_DIR%
35+
echo.
36+
37+
if not exist "%TOMCAT_HOME%\webapps" (
38+
echo [FAIL] Tomcat not found at: %TOMCAT_HOME%
39+
echo Set TOMCAT_HOME or pass path as argument.
40+
echo Example: deploy-local.bat "C:\tomcat"
41+
pause & exit /b 1
42+
)
43+
44+
echo [*] Cleaning previous deployment...
45+
if exist "%DEPLOY_DIR%" rmdir /s /q "%DEPLOY_DIR%"
46+
mkdir "%DEPLOY_DIR%\WEB-INF\lib"
47+
48+
echo [*] Copying webapp files...
49+
xcopy /e /q "%WEBAPP_SRC%\*" "%DEPLOY_DIR%\"
50+
51+
REM Locate MySQL JDBC connector
52+
set JDBC_JAR=
53+
for %%f in ("%NWE_ROOT%\jars\mysql\mysql-connector-j-*.jar") do set JDBC_JAR=%%f
54+
if "%JDBC_JAR%"=="" for %%f in ("%NWE_ROOT%\modules\black\presidential\Brarner.M.Alete\jars\mysql-connector-j-*.jar") do set JDBC_JAR=%%f
55+
if not "%JDBC_JAR%"=="" (
56+
copy "%JDBC_JAR%" "%DEPLOY_DIR%\WEB-INF\lib\" >nul
57+
echo [*] JDBC connector: copied
58+
) else (
59+
echo [!] WARNING: mysql-connector-j not found — database features may be limited
60+
)
61+
62+
echo.
63+
echo [OK] Deployed successfully.
64+
echo URL: http://localhost:8080/defined/
65+
echo.
66+
echo ╔═══════════════════════════════════════════════════════════════════════╗
67+
echo ║ Defined™ is ready on Windows. ║
68+
echo ║ Port 49220 (AI Server) / Port 49221 (Protocol Backend) ║
69+
echo ║ Thank you, Dave Plummer. Thank you, Microsoft. ║
70+
echo ╚═══════════════════════════════════════════════════════════════════════╝
71+
echo.
72+
pause
73+
endlocal
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@echo off
2+
REM ═══════════════════════════════════════════════════════════════════════════════
3+
REM Defined™ — Test JDBC Connectivity (Microsoft Windows)
4+
REM
5+
REM With thanks to Dave Plummer. Courtesy to Bill Gates and Melinda.
6+
REM NitroWebExpress™ — MEARVK LLC
7+
REM ═══════════════════════════════════════════════════════════════════════════════
8+
setlocal
9+
10+
set SCRIPT_DIR=%~dp0
11+
set NWE_ROOT=%SCRIPT_DIR%..\..\..\..\..
12+
13+
echo.
14+
echo ╔═══════════════════════════════════════════════════════════════════════╗
15+
echo ║ Defined™ — Test JDBC (Windows) ║
16+
echo ║ Welcome, Microsoft. Thanks to Dave Plummer. ║
17+
echo ╚═══════════════════════════════════════════════════════════════════════╝
18+
echo.
19+
20+
set JDBC_JAR=
21+
for %%f in ("%NWE_ROOT%\jars\mysql\mysql-connector-j-*.jar") do set JDBC_JAR=%%f
22+
23+
if "%JDBC_JAR%"=="" (
24+
echo [FAIL] MySQL JDBC connector not found.
25+
pause & exit /b 1
26+
)
27+
28+
echo [*] JDBC jar: %JDBC_JAR%
29+
echo [*] Testing connection to defined_dark_gray...
30+
31+
java -cp "%JDBC_JAR%" -e "Class.forName(\"com.mysql.cj.jdbc.Driver\");" 2>nul
32+
if %ERRORLEVEL% equ 0 (
33+
echo [OK] JDBC driver loads successfully.
34+
) else (
35+
echo [--] Could not verify JDBC load (Java may not be in PATH).
36+
)
37+
38+
echo.
39+
pause
40+
endlocal
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@echo off
2+
REM ═══════════════════════════════════════════════════════════════════════════════
3+
REM Defined™ — Test Local Deployment (Microsoft Windows)
4+
REM
5+
REM With thanks to Dave Plummer. Courtesy to Bill Gates and Melinda.
6+
REM NitroWebExpress™ — MEARVK LLC
7+
REM ═══════════════════════════════════════════════════════════════════════════════
8+
setlocal
9+
10+
echo.
11+
echo ╔═══════════════════════════════════════════════════════════════════════╗
12+
echo ║ Defined™ — Test Local (Windows) ║
13+
echo ║ Welcome, Microsoft. Thanks to Dave Plummer. ║
14+
echo ╚═══════════════════════════════════════════════════════════════════════╝
15+
echo.
16+
17+
echo [*] Testing Tomcat webapp at /defined/...
18+
curl -s -o nul -w " HTTP %%{http_code}" http://localhost:8080/defined/ 2>nul
19+
echo.
20+
21+
echo [*] Testing AI server on port 49220...
22+
powershell -Command "try { $c = New-Object System.Net.Sockets.TcpClient('localhost',49220); $c.Close(); Write-Host ' [OK] Port 49220 is UP' } catch { Write-Host ' [--] Port 49220 is DOWN' }" 2>nul
23+
24+
echo [*] Testing protocol backend on port 49221...
25+
powershell -Command "try { $c = New-Object System.Net.Sockets.TcpClient('localhost',49221); $c.Close(); Write-Host ' [OK] Port 49221 is UP' } catch { Write-Host ' [--] Port 49221 is DOWN' }" 2>nul
26+
27+
echo.
28+
pause
29+
endlocal

0 commit comments

Comments
 (0)