Mike Gerwitz

Free Software Hacker+Activist

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike@mikegerwitz.com>2013-06-01 23:23:09 -0400
committerMike Gerwitz <mike@mikegerwitz.com>2013-06-02 12:27:02 -0400
commit876b763a8d26a0eace08b70cfd50d44183a2bdde (patch)
treef74c2054aa0762ff1f3a96771c7785c8215b15a7
parentd91d0cb7119390650456b06a9accbbab148a91b6 (diff)
downloadthoughts-876b763a8d26a0eace08b70cfd50d44183a2bdde.zip
thoughts-876b763a8d26a0eace08b70cfd50d44183a2bdde.tar.gz
thoughts-876b763a8d26a0eace08b70cfd50d44183a2bdde.tar.bz2
Added intial pages
-rw-r--r--.gitignore2
-rw-r--r--Makefile7
-rw-r--r--README6
-rw-r--r--docs/10-about.pg37
-rw-r--r--docs/20-projects.pg41
-rw-r--r--docs/30-papers.pg7
-rw-r--r--docs/about/gnu-inside-ex6
-rw-r--r--docs/about/inside.pg33
-rw-r--r--images/gnu-inside.png (renamed from images/gnulinuxinside.png)bin3121 -> 3121 bytes
-rw-r--r--images/gnu-inside.xcfbin0 -> 6842 bytes
-rw-r--r--images/heckert-gnu.pngbin0 -> 9303 bytes
-rwxr-xr-xtools/doclist39
-rwxr-xr-xtools/extfmt16
-rw-r--r--tpl/.config5
-rwxr-xr-xtpl/content5
15 files changed, 193 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index c516d5d..cde36a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
*.html
-# build dir
www-root
+docs/papers/.list
diff --git a/Makefile b/Makefile
index 0313117..6cba16e 100644
--- a/Makefile
+++ b/Makefile
@@ -58,8 +58,11 @@ thoughts:
$<
./tools/mgify "$@"
-%.html: %.pg
- $(repo2html) -icontent -ftools/extfmt < $< > $@
+%.html: %.pg docs/papers/.list
+ $(repo2html) -icontent -ftools/extfmt <$< >$@
+
+docs/papers/.list: $(articles)
+ echo "$(articles)" | tr ' ' '\n' | tools/doclist >$@
pages: $(pages)
articles: $(articles)
diff --git a/README b/README
index 4293bb9..e8d6356 100644
--- a/README
+++ b/README
@@ -1,3 +1,5 @@
-Just a bunch of random thoughts at random times.
+The miscellaneous thoughts and ramblings of a free software hacker.
-http://mikegerwitz.com/thoughts/
+This website is processed with repo2html.
+
+http://mikegerwitz.com/
diff --git a/docs/10-about.pg b/docs/10-about.pg
index e69de29..1544eb5 100644
--- a/docs/10-about.pg
+++ b/docs/10-about.pg
@@ -0,0 +1,37 @@
+About
+
+Mike Gerwitz is a [free (as in freedom) software][0] [hacker][1] and activist
+with an insatiable lust for the command line of a [GNU][2] operating system.
+While much of his earlier experience focused on web development, much of his
+free time is now spent researching machine architectures, compilers, mathematics
+and various other fields. He also closely follows the work of the [Free Software
+Foundation][0], [Electronic Frontier Foundation][3] and other entities devoted
+to free information and free society.
+
+Outside of his field, Mike enjoys time with his family---including his fiancé
+and son---whom keep him busy and probably contribute to the retention of his
+sanity. Mike also has a fascination with a wide range of sciences that he
+wishes he had the time to devote to researching.
+
+A great deal of information regarding Mike's opinions on various topics can be
+found throughout this website. Much of the site is devoted to his thoughts and
+ramblings on various matters and so may contain material that is subject to
+extreme bias; the reader is encouraged to construct his or her own opinions.
+Papers are styled such that they focus on the topic at hand and void themselves
+of most of the political and author-specific content found on this website.
+Formal papers contain no such influence without rationale and references.
+
+Mike may be contacted by sending any e-mail to this domain, though he
+conventionally prefers the user `mike'; he does not make use of ``social media''
+websites, though he may (or may not) respond to queries on websites that he is a
+member of.
+
+(Note: This website itself is free---the source code is available via the commit
+hash links in the footer of various pages and the content is licensed for free
+distribution and, in some cases, modification.)
+
+
+[0] http://www.gnu.org/philosophy/
+[1] http://www.gnu.org/philosophy/words-to-avoid.html#Hacker
+[2] http://gnu.org/
+[3] http://eff.org/
diff --git a/docs/20-projects.pg b/docs/20-projects.pg
index e69de29..9933c1b 100644
--- a/docs/20-projects.pg
+++ b/docs/20-projects.pg
@@ -0,0 +1,41 @@
+Free Software Projects
+
+Listed below are my notable public projects. I have various other scripts and
+personal playthings that may be found on both [Gitorious][0] and [GitHub][1]
+that are not worth listing here, but may be of interest to certain
+readers/hackers.
+
+While writings are certainly projects in their own right, they are listed
+separately in the ``Papers'' section of this website.
+
+[ease.js][2] is a classical object-oriented framework for JavaScript intended to
+eliminate boilerplate code and ``ease'' the transition into JavaScript from
+other object-oriented languages.
+
+[repo2html][3] is a repository-agnostic HTML-generation tool used to generate
+content from commit messages; it is the tool used to generate much of the
+content on this website and was developed precisely for that reason. As such,
+the project currently only supports Git.
+
+[git-supp][4] contains a number of supplemental scripts for Git that I have
+found to be useful. Examples include short aliasing for common commands (e.g.
+typing `c` instead of `git commit`), a colorful PS1 and a state hook for
+displaying and automatically augmenting commit messages with branch-specific
+state strings.
+
+[thoughts][5] is this website; readers and hackers are welcome to use the
+repository for offline browsing, learning, distributing, mirroring, compiling in
+alternate formats or whatever else the content licenses permit. Code is released
+under a free software license and creative works (such as thoughts, articles and
+papers) are released under licenses that permit free distribution and, in
+certain cases, modification. Direct links to various commits may be found via
+the commit hashes within the footer of most pages.
+
+
+[0] http://gitorious.org/~mikegerwitz
+[1] http://github.com/mikegerwitz
+[2] http://easejs.org/
+[3] https://gitorious.org/repo2html or https://github.com/mikegerwitz/repo2html
+[4] https://gitorious.org/git-supp or https://github.com/mikegerwitz/git-supp
+[5] https://gitorious.org/mtg-personal/thoughts or
+https://github.com/mikegerwitz/thoughts
diff --git a/docs/30-papers.pg b/docs/30-papers.pg
index e69de29..09ee1eb 100644
--- a/docs/30-papers.pg
+++ b/docs/30-papers.pg
@@ -0,0 +1,7 @@
+Papers / Articles
+
+More information on each work is provided via its respective link. If a thought
+post (that is---one of the posts that is listed on the index page) is of
+adequate length with sufficient references and content, it may too be included.
+
+[cat:docs/papers/.list]
diff --git a/docs/about/gnu-inside-ex b/docs/about/gnu-inside-ex
new file mode 100644
index 0000000..057cf4b
--- /dev/null
+++ b/docs/about/gnu-inside-ex
@@ -0,0 +1,6 @@
+<div id="gnulinux-inside" style="position: absolute; top: 0px; right: 0px;">
+ <a href="http://gnu.org/">
+ <img src="http://mikegerwitz.com/images/gnu-inside.png"
+ alt="GNU/Linux Inside!" title="GNU/Linux Inside!" />
+ </a>
+</div>
diff --git a/docs/about/inside.pg b/docs/about/inside.pg
new file mode 100644
index 0000000..9c6ae0f
--- /dev/null
+++ b/docs/about/inside.pg
@@ -0,0 +1,33 @@
+GNU/Linux Inside
+
+[img:heckert-gnu.png:GNU]
+
+This website and the server on which it is hosted is run entirely by [free
+software][0].
+
+Do you use GNU/Linux or other free software on your website? Flaunt it! Feel
+free to place the image below on your own website, blog, or anywhere else you
+see fit to let others know that you support GNU and free software.
+
+This image also helps to bring awareness to the [GNU operating system][1] as
+well as GNU's philosophy.[0] The majority of users today consider the operating
+system to be called ``Linux'', which is false---this is the name of the kernel;
+GNU is the operating system.[2]
+
+*The page fold is transparent*; it will therefore work well with any background
+color. Please note that this is a PNG with alphatransparency---older browsers
+that users shouldn't be using anymore (such as IE 6) will not render it properly
+unless you take the necessary precautions.
+
+[img:gnu-inside.png:GNU/Linux Inside!]
+
+Feel free to [download the source file (GIMP)][3]. Below is the code with which
+you may embed this on your own website.
+
+[src:docs/about/gnu-inside-ex:html]
+
+
+[0] http://www.gnu.org/philosophy/
+[1] http://www.gnu.org/
+[2] http://www.gnu.org/gnu/linux-and-gnu.html
+[3] http://mikegerwitz.com/images/gnu-inside.xcf
diff --git a/images/gnulinuxinside.png b/images/gnu-inside.png
index 5177067..5177067 100644
--- a/images/gnulinuxinside.png
+++ b/images/gnu-inside.png
Binary files differ
diff --git a/images/gnu-inside.xcf b/images/gnu-inside.xcf
new file mode 100644
index 0000000..7c6ad32
--- /dev/null
+++ b/images/gnu-inside.xcf
Binary files differ
diff --git a/images/heckert-gnu.png b/images/heckert-gnu.png
new file mode 100644
index 0000000..a815dba
--- /dev/null
+++ b/images/heckert-gnu.png
Binary files differ
diff --git a/tools/doclist b/tools/doclist
new file mode 100755
index 0000000..8583f31
--- /dev/null
+++ b/tools/doclist
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# Generates HTML fragment for document list
+#
+# Copyright (C) 2013 Mike Gerwitz
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# ensure extglob is on for !() syntax
+shopt -s extglob || exit $?
+
+echo '<ol class="docs">'
+
+# paths are expected to be on their own line
+while read f; do
+ [ -f "$f" ] || continue
+
+ # the docs/papers prefix will be stripped from the link and the link title
+ # will be taken from the first line of the source file; the source file is
+ # guessed by simply stripping the html suffix off of the filename and
+ # globbing for any non-html suffix
+ printf '<li><a href="%s">%s</a></li>\n' \
+ "${f#docs/papers/}" \
+ "$( head -n1 "${f%.html}".!(html) )"
+done
+
+echo '</ol>'
diff --git a/tools/extfmt b/tools/extfmt
index a7fa233..be0ae20 100755
--- a/tools/extfmt
+++ b/tools/extfmt
@@ -23,22 +23,32 @@
# messages...if you try to inline an image in a commit message using this
# format, then you should probably pretend the brackets are staples and lodge
# them into your skull)
+#
+# XXX: These do little to prevent against malicious code execution since, well,
+# they are used for my own personal content...you've been warned (they are also
+# strongly bias toward allowing only Unix-like paths)
"$msgfmt_default" "$@" \
| awk -vpath_root="$path_root" '
- match($0, /\[img:([^:]+?)(:(.*?))?\]/, g) {
+ match($0, /\[img:([a-z/.-]+?)(:(.*?))?\]/, g) {
print "<div class=\"inline-img\">"
print " <img src=\"/images/" g[1] "\" alt=\"" g[3] "\" title=\"" g[3] "\" />"
print "</div>"
-
next
}
- match($0, /\[src:(.*?):(.*?)\]/, g) {
+ match($0, /\[src:([a-z/.-]+?):(.*?)\]/, g) {
c = "source-highlight -s" g[2] " -i" path_root "/" g[1]
print "<div class=\"listingblock\">"
while ( c | getline ) print
print "</div>"
+ next
+ }
+
+ match($0, /\[cat:([a-z/.-]+?)\]/, g) {
+ c = "cat -- " path_root "/" g[1]
+ while ( c | getline ) print
+ next
}
{ print }
diff --git a/tpl/.config b/tpl/.config
index df33014..1406ecc 100644
--- a/tpl/.config
+++ b/tpl/.config
@@ -58,8 +58,8 @@ EOH
# additional content in the footer before the copyright (the awkward newline
# positions are to prevent spaces in the output)
html_footer=$(cat <<EOM
- <a href="/about/inside/" id="gnuinside">
- <img src="/images/gnulinuxinside.png" alt="GNU/Linux Inside!" />
+ <a href="/about/inside" id="gnuinside">
+ <img src="/images/gnu-inside.png" alt="GNU/Linux Inside!" />
</a>
<div class="bimgs">
@@ -116,6 +116,5 @@ html_index_footer=$(cat <<EOM
/>
</a>
</div>
-
EOM
)
diff --git a/tpl/content b/tpl/content
new file mode 100755
index 0000000..301c5eb
--- /dev/null
+++ b/tpl/content
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# for the time being, content pages are simply styled with the index page
+export html_body_class='index content'
+resume-default index