Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile
@jeremyboggs
jeremyboggs / urlchooser.md
Created August 14, 2014 17:58
Key in each letter of the alphabet in address bar, see what URL the browser chooses first.

My results:

  • a - ach.org
  • b - blakearchive.org
  • c - codepen.io
  • d - docs.google.com
  • e - espn.go.com
  • f - flickr.com
  • g - google.com
  • h - html5boilerplate.com
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Intro to Forms</title>
<style type="text/css">
label {
display:block;

Research and Scholarship: Categories

Kind of Interaction

  • One-to-one (reference, consultation)
  • One-to-many (workshops, guides, online resources)
  • Many-to-many (events, conferences, networking)

Degree of Involvement or Investment

git config --global alias.amend 'commit -a --amend --no-edit'
@jeremyboggs
jeremyboggs / switch-theme.php
Last active August 29, 2015 13:57
Code to run on WP theme activation and deactivation.
<?php
/**
* On theme activation.
*/
function ivanhoe_after_switch_theme($theme_name) {
}
add_action('after_switch_theme', 'ivanhoe_after_switch_theme');
<?php
add_filter('locale', 'change_locale');
function change_locale($locale) {
if(isset($_GET['locale'])) {
$locale = $_GET['locale'];
}
<?php
function public_nav_has_subpages() {
$view = get_view();
$nav = new Omeka_Navigation;
$nav->loadAsOption(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_OPTION_NAME);
$nav->addPagesFromFilter(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_FILTER_NAME);
$pages = get_view()->navigation()->menu($nav)->getPages();
foreach($pages as $page) {
if($page->hasPages()) {
return true;
#!/usr/bin/env python
import sys
import os
import fnmatch
import random
import re
from bs4 import BeautifulSoup
skipped = []
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Index</title>
<style type="text/css" media="all">
* {box-sizing:border-box;}
body,
@jeremyboggs
jeremyboggs / use_file_description_alt.php
Last active December 24, 2015 00:09
Use DC:Description on File record for alt attribute in Omeka 2.x.
<?php
/**
* Use the DC: Description field on a File record for an image's alt attribute. Add this snippet to
* a plugin or to your theme's custom.php file.
*
* See https://github.com/omeka/Omeka/blob/master/application/views/helpers/FileMarkup.php#L744-751
* for parameters available to the file_markup filter.
*
* See https://github.com/omeka/Omeka/blob/master/application/views/helpers/FileMarkup.php#L619-647