rename .cgi to .sh
This commit is contained in:
parent
2e52b3bd64
commit
8cc7f932b6
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Content-type: text/html; charset=UTF-8\n"
|
||||
printf "\n"
|
||||
|
||||
printf "<html>\n"
|
||||
printf "<head>\n"
|
||||
printf "<title>Bash CGI script</title>\n"
|
||||
printf '<link rel="stylesheet" href="https://tilde.team/~ben/gruvbox/gruvbox.css">\n'
|
||||
printf '<meta name="viewport" content="width=device-width, initial-scale=1.0" />\n'
|
||||
|
||||
printf "</head>"
|
||||
printf '<body id="top">'
|
||||
printf "<main>"
|
||||
printf "<p>Hello, Your IP address is %s</p>" "$REMOTE_ADDR"
|
||||
printf "<p>the script filename is <pre>%s</pre></p>" "$SCRIPT_FILENAME"
|
||||
printf "<p>the script name is <pre>%s</pre></p>" "$SCRIPT_NAME"
|
||||
printf "<pre>"
|
||||
env
|
||||
printf "</pre>"
|
||||
printf "</main>"
|
||||
printf "</body>"
|
||||
printf "</html>"
|
||||
|
||||
exit 0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env fossil
|
||||
|
||||
directory: /home/ben/fossil
|
||||
notfound: https://tildegit.org/ben
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>cgi-bin</title>
|
||||
<link rel="stylesheet" href="https://tilde.team/~ben/gruvbox/gruvbox.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
<body id="top">
|
||||
<main>
|
||||
<h1>cgi-bin</h1>
|
||||
|
||||
<p>here are some scripts i've been playing with</p>
|
||||
|
||||
<ul>
|
||||
<?php foreach (glob("*") as $cgi) {
|
||||
$cgi = basename($cgi);
|
||||
if ($cgi === "index.php") continue; ?>
|
||||
<li>
|
||||
<a href="<?=$cgi?>"><?=$cgi?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<p>sources available on <a href="https://tildegit.org/ben/tilde/src/branch/master/cgi-bin">tildegit</a></p>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
# -*- coding: utf-8 -*-
|
||||
echo "Content-type:text/html"
|
||||
echo ""
|
||||
printf "Content-type: text/html; charset=UTF-8\n"
|
||||
printf "\n"
|
||||
|
||||
printf '<table>\n'
|
||||
printf '<tr><td width="130px">time:</td><td>%s</td></tr>\n' "$(/bin/date +'%A, %d.%m.%Y - %H:%M:%S %Z')"
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Content-type: text/plain"
|
||||
echo ""
|
||||
|
||||
landscape-sysinfo
|
||||
echo $SCRIPT_NAME
|
||||
echo $SCRIPT_FILENAME
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Content-type: text/plain; charset=UTF-8\n\n"
|
||||
|
||||
landscape-sysinfo
|
||||
exit 0
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
|
||||
echo "<html>"
|
||||
echo "<head>"
|
||||
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"
|
||||
echo "<title>Bash CGI script</title>"
|
||||
echo "</head>"
|
||||
echo "<body>"
|
||||
echo "<p>Hello, Your IP address is $REMOTE_ADDR</p>"
|
||||
echo "<p>the script filename is <pre>$SCRIPT_FILENAME</pre></p>"
|
||||
echo "<p>the script name is <pre>$SCRIPT_NAME</pre></p>"
|
||||
echo "<pre>"
|
||||
env
|
||||
echo "</pre>"
|
||||
echo "</body>"
|
||||
echo "</html>"
|
||||
|
||||
exit 0
|
||||
|
|
@ -1 +1 @@
|
|||
232
|
||||
236
|
|
@ -1,6 +1,7 @@
|
|||
@font-face{
|
||||
font-family: 'JetBrains Mono';
|
||||
src: url('https://tilde.team/~ben/fonts/jetbrains-mono/eot/JetBrainsMono-Regular.eot') format('embedded-opentype'),
|
||||
src: local('JetBrains Mono'),
|
||||
url('https://tilde.team/~ben/fonts/jetbrains-mono/eot/JetBrainsMono-Regular.eot') format('embedded-opentype'),
|
||||
url('https://tilde.team/~ben/fonts/jetbrains-mono/woff2/JetBrainsMono-Regular.woff2') format('woff2'),
|
||||
url('https://tilde.team/~ben/fonts/jetbrains-mono/woff/JetBrainsMono-Regular.woff') format('woff'),
|
||||
url('https://tilde.team/~ben/fonts/jetbrains-mono/ttf/JetBrainsMono-Regular.ttf') format('truetype');
|
||||
|
@ -9,6 +10,9 @@
|
|||
}
|
||||
|
||||
main {
|
||||
-webkit-font-feature-settings: "liga" on, "calt" on;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
max-width: 38rem;
|
||||
padding: 2rem;
|
|
@ -1,13 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
<link rel="stylesheet" href="gruvbox-jetbrains-mono.css">
|
||||
<title>gruvbux</title>
|
||||
<link rel="stylesheet" href="gruvbox.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
<body id="top">
|
||||
<main>
|
||||
<h1>Page title</h1>
|
||||
<h1>gruvbov</h1>
|
||||
|
||||
<p>Hello! this is an example page using <a href="https://github.com/Xe/gruvbox-css">gruvbox-css</a></p>
|
||||
|
||||
|
|
Loading…
Reference in New Issue