Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile

Is there a label or name for this task?

Converting this:

<?php
echo "<div class=\"db_result_sub_area\"><strong><a href=\"radial_graph.php?person_id=" . $unique_id . "\" target=\"_blank\">Explore Radial Graph</a></strong> (opens in new tab)</div>\n" ;
echo "</div>";
?>
@jeremyboggs
jeremyboggs / git-svn-workflow.md
Last active September 19, 2016 13:59
A Git-SVN workflow that uses both a SVN and Github remote

A Git-SVN Workflow

Scenario: There is a private Subversion repository that is the primary repository for a project. I still need to push, and pull, from that repo, while also using a remote Github repo as the primary place to save ongoing work, issues, etc.

Workflow

  • Subversion repo uses a non-standard layout; No trunk, no branches.
  • Git repo uses a modified version of git-flow.
    • The master branch is a mirror of the Subversion repo. Never commit to that directly. Or, if I do, I immediate do git svn dcommit before makign topic branches.
  • Topic branches for features and bug-fixes, off of master.
<section class="slide jentery-sayers" id="jentery-sayers">
<h1>Remaking Victorian Miniatures: The Speculative Stitches between 2D and 3D</h1>
<p><strong>November 20, 2014<br>
10:00 am–11:30 am<br>
Alderman Library, Room 421</strong></p>
<p>In both digital humanities and popular culture, there is a rapidly growing interest in big data. But in this talk I shift the focus away from amounts of data and toward ways of seeing with computers. In this sense, contemporary computing is more about mediation than media, or more about vision than the visible. Ats of remaking involve serious speculation, and also rely quite heavily on computation to stitch together evidence in the presence of absences. In short, they are matters not of “how many” but of “how this becomes that.”</p>
</section>
<?php
class CustomItemsBrowsePlugin extends Omeka_Plugin_AbstractPlugin
{
protected $_hooks = array(
'items_browse_sql'
);
public function hookItemsBrowseSql($args) {
@jeremyboggs
jeremyboggs / singular-post-type-label.php
Created May 15, 2016 12:08
Display the singular label for a post type in WordPress. (Sigh....)
<?php
$post_type = get_query_var( 'post_type' );
if ( is_array( $post_type ) ) {
$post_type = reset( $post_type );
}
$post_type_obj = get_post_type_object( $post_type );
?>
<h1><?php echo $post_type_obj->labels->singular_name; ?></h1>
/* Default styles */
body {}
/* 600px Breakpoint */
@media screen and (min-width: 600px) {
}
/* 900px Breakpoint */
@media screen and (min-width: 900px) {
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>My Project</title>
<link rel="stylesheet" href="styles.css">
<a href="#">Skip to main content</a>
<header role="banner">
<h1>My project</h1>
</header>
<main id="main" role="main">
<h2>Lorem Ipsum</h2>
@jeremyboggs
jeremyboggs / library.html
Last active December 20, 2015 22:13
Jekyll datafile and template for library listing.
{% assign library = site.data.library | sort: 'title' %}
<ul>
{% for work in library %}
<li>
<a href="{{ work.resource }}">
<em>{{ work.title }}</em>
</a>,
{% assign authors = work.author %}
{% if authors %}
@jeremyboggs
jeremyboggs / index.html
Last active December 16, 2015 23:44
Basic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Your Name · Home</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Add your content -->
@jeremyboggs
jeremyboggs / authors.html
Last active November 28, 2015 21:49
Parse a list of authors with Liquid templating. Handles single and multiple authors.
{% assign authors = page.author %}
{% if authors %}
<p>By
{% for author in authors %}
{% if forloop.last and forloop.length > 1 %} and {% endif %}<span resource="{{ author.resource }}" typeof="Person" property="creator"><em property="rdfs:label">{{ author.name }}</em></span>{% if forloop.last == false and forloop.length > 2 %}, {% endif %}{% endfor %}.</p>
{% endif %}
</p>