st==2 {print \$0};
/$1--/ {st=0};
/^\\r$/ && st==1 {st=2};
- " | head -c -2
+ " | head -c -2 | head -c $((128*1024))
# Remove trailing ^M's that come with CGI
+ # Limit size to 128K
}
# Print out a generic header
# has a real terminal, not that we also have to set
# term=xterm-256color in vimrc
HOME=/home/andy \
- screen -D -m ex -u vimrc \
+ screen -D -m ex -Z -u vimrc \
'+2d|'$trim \
'+%s/\r//g' \
'+TOhtml' \
cat - <<EOF
<html>
<head>
+ <title>vpaste.net - Vim based pastebin</title>
<style>
* { margin:0; padding:0; }
body { margin:1em; }
<br>
<h4>NAME</h4>
- <p>vpaste: Vim enabled pastebin</p>
+ <p>vpaste: Vim based pastebin</p>
<h4>SYNOPSIS</h4>
<pre> vpaste file [option=value,..]</pre>
<a href="vimrc?ft=vim">vimrc</a>
<a href="htaccess?ft=apache">htaccess</a>
<li><a href="2html-et.patch?ft=diff">2html-et.patch</a>
+ <li><a href="https://lug.rose-hulman.edu/svn/misc/trunk/htdocs/vpaste/">Subversion</a>
</ul>
<h4>LATEST UPLOADS</h4>