/resume.md
/_site/resume.html
+/_site/tmp
Some programs need to be in PATH:
https://iankelling.org/git/?p=basic-https-conf;a=summary
-https://iankelling.org/git/?p=acme-tiny-wrapper;a=summary
chost from
https://iankelling.org/git/?p=fai;a=summary
require 'fileutils'
require 'time'
require 'sqlite3'
-
Dir.chdir(File.join(File.dirname(__FILE__), '..'))
require '../b'
<p>#{captcha_q}</p>
<form action="/cgi/comment" method="post">
- <input class="misc" type="text" name="url">
+ <input class="misc-comment-input" type="text" name="url">
<input name="goto" type="hidden" value="#{GOTO}">
<input name="question" type="hidden" value="#{captcha_q}">
<input name="answer">
if new_count == 1
require 'net/smtp'
- def send_email(opts={})
- opts[:to] ||= 'root'
- opts[:server] ||= 'localhost'
- opts[:from] ||= 'root'
- opts[:from_alias] ||= 'root'
- opts[:subject] ||= "test subject"
- opts[:body] ||= ""
-
- msg = <<END_OF_MESSAGE
-From: #{opts[:from_alias]} <#{opts[:from]}>
-To: <#{opts[:to]}>
-Subject: #{opts[:subject]}
-
-#{opts[:body]}
+ to = 'root@' + FQDN
+ from = 'www-data@' + FQDN
+ server = 'localhost'
+ msg = <<END_OF_MESSAGE
+From: h <#{from}>
+To: <#{to}>
+Subject: "new comment on #{FQDN}"
+
+empty body
END_OF_MESSAGE
-
- Net::SMTP.start(opts[:server]) do |smtp|
- smtp.send_message msg, opts[:from], opts[:to]
- end
+ Net::SMTP.start(server) do |smtp|
+ smtp.send_message msg, from, to
end
- send_email :subject => "new comment on #{DN}"
end
post(md_file)
<h3><a href="/">iankelling.org</a>#{o[:header]}</h3>
</header>
<div class="main-content-stripe">
- <div class="content">
+ <div class="#{o[:prose] ? "prose" : "content"}">
#{content}
</div>
</div>
<form action="/cgi/comment" method="post">
<input class="misc-comment-input" type="text" name="url">
<input name="goto" type="hidden" value="#{rel_path}">
- <textarea rows="10" name="comment" placeholder="markdown" maxlength="1000"></textarea>
- <input type="submit" value="Leave a comment">
+ <textarea rows="10" name="comment" maxlength="1000"></textarea>
+ <input type="submit" value="Add a comment (markdown works)">
</form>
<div id="comments">
#{com_list}
fskel(rel_path, title, page_html,
header: header_rel,
footer: footer_extra,
+ # We call the main content prose because it can contain
+ # code, so we want to left justify it, so we dont have
+ # to cram all the code into the middle and can use
+ # a wider area.
+ prose: true,
comments: com_section,
description: description)
url="#{DURL}#{rel_path}"
asymtotic = ['asymtotic', '']
asymtotic_modified = ['bound', 'run time', 'growth', 'growth rate']
commonly_modified = ['complexity', 'efficiency', 'growth rate']
-common_modifiers = ['computational', 'big oh', 'algorithmic', 'time',
- 'asymtotic', '']
+common_modifiers = ['computational', 'big oh', 'algorithmic', 'time', 'asymtotic', '']
unmodified = ['big oh', 'order', 'order of complexity', 'time']
O = bnf_expand([asymtotic, asymtotic_modified],
[common_modifiers, commonly_modified], [unmodified])
// a few minor things are in main.css and gitweb.css
-$comment-background-color: #ebeae4;
+$comment-background-color: #d9d8d1;
$comment-br-color: #c4c3bc; // a darkish color, black is too striking
$comment-date-color: #555; // a bit lighter for less emphasis
-$content-color: #f6f6f0; // from gitweb.
+$content-color: #ebeae4;
$inline-code-background-color: #fff;
$link-color: #0645ad;
$link-visited-color: #0b0080;
padding-bottom: 30px;
padding-top: 30px;
- textarea {
- background-color: $content-color; // go with theme, avoid bright white.
- }
input:hover,
- textarea:active,
- textarea:focus {
+ textarea {
// color textarea when selected, and for submit button,
// without 3d effect, we need a different color.
background: $text-input-color;
li {
// to compensate for no bullet points, we need extra space between list items
// in the case of small screens where they wrap.
- margin-top: 12px;
+ margin-top: 10px;
}
.site-nav-list {
.comment-section,
.content,
+.prose,
.page_header,
footer {
// auto does the centering magic
margin-bottom: 0;
- margin-left: auto;
margin-right: auto;
margin-top: 0;
+ padding-left: 16px;
+ padding-right: 16px;
+}
+
+.content,
+.prose,
+.page_header,
+footer {
+ // auto on left +right does the centering magic
+ margin-left: auto;
+}
+
+
+.comment-section,
+.content,
+.prose :not(.highlight),
+.page_header,
+footer {
max-width: $main-column-max-width; // default too wide
- padding-left: 30px;
- padding-right: 30px;
}
+
code {
background-color: $inline-code-background-color;
// defaults are squished next to the borders of the color change
font-size: 15px;
}
+// for code, scroll right instead of overflowing the body
+.highlight {
+ overflow: auto;
+}
+
pre {
// defaults are squished next to the borders of the color change
padding: 6px 8px;
a:visited {
color: $link-visited-color;
}
-
shell="ssh -oStrictHostKeyChecking=no $(chost iankelling.org)"
while [[ $1 ]]; do
case $1 in
- -a) all=true; shift ;;
-l) shell= ; shift ;; # -l for local
esac
done