Git and GitHub

Fateen Alam has compiled a terrific Notion page that provides overviews of version control, setting up and using git, and then using GitHub: Git and GitHub. (Notion is one of many new entrants into the note-taking app/system/omnibus category.)

What Is Code?

Paul Ford’s [“What Is Code?”][bb] at/on _Bloomberg Business_ is a magnum opus of a treatment. My little word count app that I created as a service on my Mac logs the things at 30,000 words.


Learn to Write (Code)

This year is the year I teach myself to write code, and there have never been more resources available to humanists interested in doing so. At this moment, I would like to point out two interactive approaches as well as two more thoughtful approaches designed especially for historians (who, as always, seem better at producing these kinds of texts than other humanists):

If you are interested in a very simple, one step at a time approach to learning how to code — and those first few steps really do feel, to me, like what the first few steps must feel like to the soon-to-be toddler, transformative — then there is both [Hackety Hack][hh], which was first brought to my attention by [ProfHacker][ph] and [CodeAcademy][ca]. Hackety-Hack will teach you the basics of [Ruby][], a very powerful programming language that has also been refined for web work — e.g., Rails, which is the power behind Twitter — and CodeAcademy will teach you [JavaScript][js], another scripting language which powers some significant features of the modern web.

In the same ProfHacker article linked above, Ryan Cordell points to another resources for learning Ruby (for humanists): [The Rubyist Historian][rh] by Jason Heppler. (Unfortunately, at this moment, that portion of his site appears to be down.) There is also the terrific book [The Programming Historian][ph], which offers instruction in various ways to work in [Python][].


Visualization Toolkits

As I begin to assemble materials for my spring seminar surveying the digital humanities, I find myself trying to come up with categories, especially for describing arenas of activity. The digital humanities can be quite overwhelming when you are first introduced to them, and because everyone comes to them from so many backgrounds and with so many agendas, it’s hard to separate personal visions from something more synthetic.

Towards the latter, I am trying to think about how to describe some of the things that people regularly do, and I’ll be posting some of my initial thoughts in a series of posts that I will myself later synthesize into something like a syllabus and/or guide. Readers who want to follow along are welcome to do so. I am going to tag the posts with the number for the course, 531, and I will try to update earlier posts so that they turn up under that tag as well.

One of the first things to break out for me is the area of visualization, which is so important that it’s built into most network analysis applications. Visualization, especially dynamic visualization which allows you to adjust your view of the data in various ways, is an essential part of analysis and understanding.

Many of us are used to working with built-in visualizations toolkits like those found in Network Workbench or ORA or even Excel/Powerpoint — Numbers/Pages for those Mac users who eschew Microsoft’s productivity apps and OpenOffice users forgive me for not knowing the equivalents, but R also possesses some remarkable graphical abilities.

None of them can compare to the graphical and/or visualization abilities of two languages build for doing this kind of work: Processing and Protoviz.

Up next: a comparison of the two.

Website Infrastructure

For those who have asked, this site runs on a total of 7 PHP pages. `Index`, `search`, and `single` serve the blog portion. `Page`, `archives`, and `notes` are special purpose pages. (Yes, that’s six pages and I said seven at the outset. One page is purely for my own in-house use, and I don’t want to give it away.)


To reduce server load and to increase load times into browsers, I have opted not to use separate `footer` and `header` php files. The design of the site doesn’t change enough to warrant keeping them as separate files.

My goal in this site is always to keep the infrastructure, and the data structures, as simple as possible.

{less} extends CSS

While CSS3 continues to evolve in interesting and powerful ways, it still clings to some conventions that make it more like a set of markup conventions and less like a programming language. That is, while you can describe a lot of things in CSS, you typically have to do so verbosely and somewhat redundantly. You cannot, like most modern programming languages, compress your efforts, pass variables, create something like objects.

For those who either run Ruby or, like me, are confined to admiring it and continue to try to learn it, [`less`]( is available for installation and use and what it does to, or for, CSS is nothing short of amazing.

For one thing, you can set up variables for things used site-wide that allow you to establish, as in the example below, all your colors in one place:

@brand_color: #4D926F;

#header {
color: @brand_color;

h2 {
color: @brand_color;

Or you can use something they call *mixins* which operate like some sort of powerful hybrid of variables and functions — note how you can pass an argument to what looks like a variable:

.rounded_corners (@radius: 5px) {
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
border-radius: @radius;

#header {

#footer {

Finally, for me at least, there is the opportunity to nest selector names in a way to make inheritance more obvious:

#header {
color: red;
a {
font-weight: bold;
text-decoration: none;

(Nothing kills me more than trying to figure out inheritance of an item that just won’t style for me because I’ve missed some piece of the CSS flow in my analysis.)

Check out [`less`]( for more.

Share Delicious Library

(with simple HTML)

For anyone interested in sharing the library with friends, here are some tips. For the purpose of this explanation I am going to assume that you have a web server on your machine and that you server root directory is at `/Library/WebServer/Documents`.

1 – Copy your library file, `Library Media Data.xml`, from `~/Library/Application Support/Delicious Library/` to the root directory of you web server. I recommend renaming it to something without spaces, such as `mylibrary.xml`.
2 – Copy the directory `~/Library/Application Support/Delicious Library/Images/Small Covers` to the root of your web server.
3 – Edit the file `mylibrary.xml` (if that is the name you gave it) and add the line:

after then line that reads:

4 – Create a new file called `delicious-library.xsl` in the root folder of your web server and add the following text:



oddRow evenRow
Small Covers/   


oddRow evenRow


Small Covers/   
oddRow evenRow
Small Covers/   

5 – Now from you web server, if it is running on the same machine:


If your web server is not your local computer, then you will simply have to modify the steps with uploading instead of copying. Always be sure to modify a *copy* of your files, and not the originals. You don’t want to get burnt if you make a mistake

Run MultiMarkdown in Terminal

I found this script. I think I could substitute the PHP version of MultiMarkdown here.


# This script runs the multimarkdown       #
# script on specified file, redirects      #
# output to html file, and opens resulting #
# file in web browser.                     #

# gets complete filename of file 
srcfile="`eval echo $1`"	

# gets the filename without .txt
FILENOEXTENSION="`echo $srcfile | sed -e 's/\..*$//'`"	

# Runs perl script and creates .html file
~/MultiMarkdown/bin/ $srcfile > $FILENOEXTENSION.html	

# opens it up

Convert HTML to text

I forgot from where I copied this script:

# Usage: convert-html-to-md […]
# Convert the specified HTML files into Markdown text-format equivalents
# in the current working directory. The file extension will be .md.txt.
# Requires the Python script by Aaron Swartz to convert
# from HTML to Markdown text [].
# html2text=”${1}”shift

[while [ -n “${1}” ] ; do
# Use the contents of the title element for the filename. In case
# the title element spans multiple lines, the entire file is first
# converted to a single line before the sed pattern is applied. Any
# “unsafe” characters are then replaced with hyphens to produce a
# valid filename.
title=$(cat “${1}” | \
tr -d ‘\n\r’ | \
sed -nre ‘s/^.*(.*?)<\/title>.*$/\1\n/ip’ | \<br /> tr “\`~\!@#$%^&*()+={}|[]\\:;\”\’<>?,/ \t” ‘[-*]’)</p> <p> # If there’s no title, then just use the original filename.<br /> if [ -z “${title}” ] ; then<br /> title=$(basename “${1}” .html)<br /> fi</p> <p> # Convert the HTML to Markdown.<br /> cat “${1}” | python “${html2text}” > “${title}.md.txt”<br /> shift<br /> done]</p> </div><!-- .entry-content --> <footer class="entry-meta"> Posted on <a href="" title="12:16" rel="bookmark"><time class="entry-date" datetime="2008-05-08T12:16:18+00:00" pubdate>2008-05-08</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="" title="View all posts by John Laudun" rel="author">John Laudun</a></span></span>. <span class="cat-links"> Posted in <a href="" rel="category tag">work</a> </span> <span class="sep"> | </span> <span class="tags-links"> Tagged <a href="" rel="tag">code</a>, <a href="" rel="tag">html</a>, <a href="" rel="tag">python</a> </span> </footer><!-- .entry-meta --> </article><!-- #post-1997 --> <nav role="navigation" id="nav-below" class="site-navigation paging-navigation"> <h1 class="assistive-text">Post navigation</h1> <div class="nav-previous"><a href="" ><span class="meta-nav">←</span> Older posts</a></div> </nav><!-- #nav-below --> </div><!-- #content .site-content --> </section><!-- #primary .content-area --> <div id="secondary" class="widget-area" role="complementary"> <aside id="search-2" class="widget widget_search"> <form method="get" id="searchform" action="" role="search"> <label for="s" class="assistive-text">Search</label> <input type="text" class="field" name="s" value="" id="s" placeholder="Search …" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" /> </form> </aside> <aside id="recent-posts-2" class="widget widget_recent_entries"> <h1 class="widget-title">Recent Posts</h1> <ul> <li> <a href="">Stuff in Space</a> </li> <li> <a href="">On Deception</a> </li> <li> <a href="">Defense Contexts</a> </li> <li> <a href="">The Way This Work Unfolds</a> </li> <li> <a href="">Graph Visualization Libraries</a> </li> </ul> </aside><aside id="meta-2" class="widget widget_meta"><h1 class="widget-title">Meta</h1> <ul> <li><a href="">Log in</a></li> <li><a href="">Entries feed</a></li> <li><a href="">Comments feed</a></li> <li><a href=""></a></li> </ul> </aside><aside id="categories-2" class="widget widget_categories"><h1 class="widget-title">Categories</h1> <ul> <li class="cat-item cat-item-754"><a href="">500</a> </li> <li class="cat-item cat-item-751"><a href="">application</a> </li> <li class="cat-item cat-item-2"><a href="">basic</a> </li> <li class="cat-item cat-item-1"><a href="">chronicle</a> </li> <li class="cat-item cat-item-5"><a href="">home</a> </li> <li class="cat-item cat-item-753"><a href="">teaching</a> </li> <li class="cat-item cat-item-6"><a href="">work</a> </li> </ul> </aside><aside id="archives-2" class="widget widget_archive"><h1 class="widget-title">Archives</h1> <ul> <li><a href=''>May 2022</a></li> <li><a href=''>April 2022</a></li> <li><a href=''>March 2022</a></li> <li><a href=''>February 2022</a></li> <li><a href=''>January 2022</a></li> <li><a href=''>December 2021</a></li> <li><a href=''>November 2021</a></li> <li><a href=''>August 2021</a></li> <li><a href=''>July 2021</a></li> <li><a href=''>June 2021</a></li> <li><a href=''>May 2021</a></li> <li><a href=''>April 2021</a></li> <li><a href=''>March 2021</a></li> <li><a href=''>February 2021</a></li> <li><a href=''>January 2021</a></li> <li><a href=''>December 2020</a></li> <li><a href=''>November 2020</a></li> <li><a href=''>October 2020</a></li> <li><a href=''>August 2020</a></li> <li><a href=''>July 2020</a></li> <li><a href=''>June 2020</a></li> <li><a href=''>May 2020</a></li> <li><a href=''>April 2020</a></li> <li><a href=''>March 2020</a></li> <li><a href=''>February 2020</a></li> <li><a href=''>January 2020</a></li> <li><a href=''>December 2019</a></li> <li><a href=''>November 2019</a></li> <li><a href=''>October 2019</a></li> <li><a href=''>September 2019</a></li> <li><a href=''>August 2019</a></li> <li><a href=''>July 2019</a></li> <li><a href=''>June 2019</a></li> <li><a href=''>May 2019</a></li> <li><a href=''>April 2019</a></li> <li><a href=''>March 2019</a></li> <li><a href=''>February 2019</a></li> <li><a href=''>January 2019</a></li> <li><a href=''>December 2018</a></li> <li><a href=''>November 2018</a></li> <li><a href=''>October 2018</a></li> <li><a href=''>September 2018</a></li> <li><a href=''>August 2018</a></li> <li><a href=''>July 2018</a></li> <li><a href=''>June 2018</a></li> <li><a href=''>May 2018</a></li> <li><a href=''>March 2018</a></li> <li><a href=''>February 2018</a></li> <li><a href=''>January 2018</a></li> <li><a href=''>December 2017</a></li> <li><a href=''>November 2017</a></li> <li><a href=''>October 2017</a></li> <li><a href=''>September 2017</a></li> <li><a href=''>August 2017</a></li> <li><a href=''>June 2017</a></li> <li><a href=''>May 2017</a></li> <li><a href=''>April 2017</a></li> <li><a href=''>March 2017</a></li> <li><a href=''>February 2017</a></li> <li><a href=''>January 2017</a></li> <li><a href=''>December 2016</a></li> <li><a href=''>November 2016</a></li> <li><a href=''>October 2016</a></li> <li><a href=''>September 2016</a></li> <li><a href=''>August 2016</a></li> <li><a href=''>July 2016</a></li> <li><a href=''>June 2016</a></li> <li><a href=''>May 2016</a></li> <li><a href=''>April 2016</a></li> <li><a href=''>March 2016</a></li> <li><a href=''>February 2016</a></li> <li><a href=''>January 2016</a></li> <li><a href=''>December 2015</a></li> <li><a href=''>November 2015</a></li> <li><a href=''>October 2015</a></li> <li><a href=''>September 2015</a></li> <li><a href=''>August 2015</a></li> <li><a href=''>July 2015</a></li> <li><a href=''>June 2015</a></li> <li><a href=''>May 2015</a></li> <li><a href=''>April 2015</a></li> <li><a href=''>March 2015</a></li> <li><a href=''>February 2015</a></li> <li><a href=''>January 2015</a></li> <li><a href=''>December 2014</a></li> <li><a href=''>November 2014</a></li> <li><a href=''>October 2014</a></li> <li><a href=''>September 2014</a></li> <li><a href=''>August 2014</a></li> <li><a href=''>July 2014</a></li> <li><a href=''>June 2014</a></li> <li><a href=''>May 2014</a></li> <li><a href=''>April 2014</a></li> <li><a href=''>March 2014</a></li> <li><a href=''>February 2014</a></li> <li><a href=''>January 2014</a></li> <li><a href=''>December 2013</a></li> <li><a href=''>November 2013</a></li> <li><a href=''>October 2013</a></li> <li><a href=''>September 2013</a></li> <li><a href=''>August 2013</a></li> <li><a href=''>July 2013</a></li> <li><a href=''>June 2013</a></li> <li><a href=''>May 2013</a></li> <li><a href=''>April 2013</a></li> <li><a href=''>March 2013</a></li> <li><a href=''>February 2013</a></li> <li><a href=''>January 2013</a></li> <li><a href=''>December 2012</a></li> <li><a href=''>November 2012</a></li> <li><a href=''>October 2012</a></li> <li><a href=''>September 2012</a></li> <li><a href=''>August 2012</a></li> <li><a href=''>July 2012</a></li> <li><a href=''>June 2012</a></li> <li><a href=''>May 2012</a></li> <li><a href=''>April 2012</a></li> <li><a href=''>March 2012</a></li> <li><a href=''>February 2012</a></li> <li><a href=''>January 2012</a></li> <li><a href=''>December 2011</a></li> <li><a href=''>November 2011</a></li> <li><a href=''>October 2011</a></li> <li><a href=''>September 2011</a></li> <li><a href=''>August 2011</a></li> <li><a href=''>July 2011</a></li> <li><a href=''>June 2011</a></li> <li><a href=''>May 2011</a></li> <li><a href=''>April 2011</a></li> <li><a href=''>March 2011</a></li> <li><a href=''>February 2011</a></li> <li><a href=''>January 2011</a></li> <li><a href=''>December 2010</a></li> <li><a href=''>November 2010</a></li> <li><a href=''>October 2010</a></li> <li><a href=''>September 2010</a></li> <li><a href=''>August 2010</a></li> <li><a href=''>July 2010</a></li> <li><a href=''>June 2010</a></li> <li><a href=''>May 2010</a></li> <li><a href=''>April 2010</a></li> <li><a href=''>March 2010</a></li> <li><a href=''>February 2010</a></li> <li><a href=''>January 2010</a></li> <li><a href=''>December 2009</a></li> <li><a href=''>November 2009</a></li> <li><a href=''>October 2009</a></li> <li><a href=''>September 2009</a></li> <li><a href=''>August 2009</a></li> <li><a href=''>July 2009</a></li> <li><a href=''>June 2009</a></li> <li><a href=''>May 2009</a></li> <li><a href=''>April 2009</a></li> <li><a href=''>March 2009</a></li> <li><a href=''>February 2009</a></li> <li><a href=''>January 2009</a></li> <li><a href=''>December 2008</a></li> <li><a href=''>November 2008</a></li> <li><a href=''>October 2008</a></li> <li><a href=''>September 2008</a></li> <li><a href=''>August 2008</a></li> <li><a href=''>July 2008</a></li> <li><a href=''>June 2008</a></li> <li><a href=''>May 2008</a></li> <li><a href=''>April 2008</a></li> <li><a href=''>March 2008</a></li> <li><a href=''>February 2008</a></li> <li><a href=''>January 2008</a></li> <li><a href=''>December 2007</a></li> <li><a href=''>November 2007</a></li> <li><a href=''>October 2007</a></li> <li><a href=''>July 2007</a></li> <li><a href=''>June 2007</a></li> <li><a href=''>April 2007</a></li> <li><a href=''>March 2007</a></li> <li><a href=''>December 2006</a></li> <li><a href=''>September 2006</a></li> <li><a href=''>July 2006</a></li> <li><a href=''>June 2006</a></li> <li><a href=''>May 2006</a></li> <li><a href=''>April 2006</a></li> <li><a href=''>February 2006</a></li> <li><a href=''>January 2006</a></li> <li><a href=''>December 2005</a></li> <li><a href=''>November 2005</a></li> <li><a href=''>October 2005</a></li> <li><a href=''>September 2005</a></li> <li><a href=''>August 2005</a></li> <li><a href=''>May 2004</a></li> <li><a href=''>February 2004</a></li> <li><a href=''>December 2001</a></li> <li><a href=''>April 1992</a></li> <li><a href=''>September 1986</a></li> </ul> </aside> </div><!-- #secondary .widget-area --> </div><!-- #main .site-main --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <a href="" rel="generator">Proudly powered by WordPress</a> Theme: Publish by <a href="" rel="designer">Konstantin Kovshenin</a>. </div><!-- .site-info --> </footer><!-- #colophon .site-footer --> </div><!-- #page .hfeed .site --> <script type='text/javascript' src='' id='jetpack-photon-js'></script> <script type='text/javascript' src='' id='small-menu-js'></script> <script src='' defer></script> <script> _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:11.0',blog:'194110954',post:'0',tz:'0',srv:''} ]); _stq.push([ 'clickTrackerInit', '194110954', '0' ]); </script> </body> </html>