Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile
@jeremyboggs
jeremyboggs / salem-example.txt
Created December 12, 2017 20:09
salem-example.txt
---
title: Mary Bradbury
tags: tucben shesar allwil1 tonste rinjar swatim lonric tucmer conjoh alljam seveph hacsar morsus tucebe humar clojoh carjam easnat smiric frejos pikrob foseli1 easben greand brohen rinhan maxjoh carmar2 freabi warmar marmay geteli rinjos bussar dowsar felsam1 mavwid osgwil hoowil sewall watjoh trujan stejoh tomjoh bilsam cargeo smisam clotho whimar wineph bramar brawil stenat fresam consar neajos easann morisa hergeo moodan dowrob frejoh1 easmar1 carric1 endsam carwil bibber stehan stedor marjoh1 flejos hubric grephi pagone eatjos1 allben2 easjoh ricsar colsam osgabi ambhen lewmer maxeli wheelw widmav mooeli evatho broabr reewil pikmar pikjoh barmar buswil rintho careli fremar floseli1 eateph endzer bratho bronat bibsar booeli putann2 hubeli alljoh sevlyd sevsus pagjos carjoh walmar whinat easrog morjac hooeli trujos tufpet felsam2 evahan stejoa margeo busisa winmar felabi eassar morpho eatmar1 brohan2 eassam allmar
---
# Mary Bradbury
## (Indictment v. Mary Bradbury , for Afflicti
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
# For Mac
.DS_Store
# For VIM
.*.sw*
*~
# SASS stuff
.sass-cache
# For Mac
.DS_Store
# For VIM
.*.sw*
*~
# SASS stuff
.sass-cache
@jeremyboggs
jeremyboggs / random.bash
Created May 10, 2017 14:00
Some random bash stuff
## Generate cropped thumbnails of images.
makethumbnails() {
for f in *.jpg; do
filename=$(basename "$f")
extension="${filename##*.}"
filename="${filename%.*}"
convert "$f" -flatten -thumbnail 150x150^ -gravity Center -crop 150x150+0+0 "$filename"_small.jpg;
done
}
@jeremyboggs
jeremyboggs / PinterestScraper.py
Created April 26, 2017 17:41
Scrape locally-saved Pinterest web pages
#!/usr/bin/env python
import os
import sys
import urllib2
from bs4 import BeautifulSoup
# Base URL for Pinterest.
base_url = 'http://pinterest.com'
html_file = sys.argv[1]
@jeremyboggs
jeremyboggs / kards.py
Last active February 2, 2017 20:21
Let's download all the Kim Kardashian articles on US Weekly.
#!/usr/bin/env python
import csv
import urllib2
from bs4 import BeautifulSoup
# Base URL for US Magazine. We'll need this to build the full URL for individual
# articles, since it looks like they use relative URLs.
base_url = 'http://www.usmagazine.com'
@jeremyboggs
jeremyboggs / video_files_for_item.php
Last active February 1, 2017 16:16
Display only video files for a given Omeka item.
<?php
/**
* Display only video files for an Item.
*
* Directly queries the File table for files associated with a given Item.
* Checks the mime_type against an array of video types:
*
* - video/flv
* - video/x-flv
* - video/mp4

Some things I think are important...that I want to articulate better:

  • Understand where your project is, who has access to it, and what those with access can do with it.
  • Retain access—in every possible way—to your own project. Respect this access: Value it, appreciate it, demand it. Be ready, at any time, to take you work with you and deploy it somewhere else. Or, at least, understand what steps would be involved to be able to do that.
  • Work with people who respect that ability. Privilege those sorts of collaborations over those that seek and enforce propriety, isolation, feifdoms, etc.
  • Be ready to articulate what exactly you want your work to do, why you're doing it, and why someone should take time with it.
  • If you can't articulate something, capture that as a question, and take time at some point to consider it.
  • Continue to articulate a lifecycle for your projects. Share this with others, so they know—and can possibly contribute to—your plans.
  • Any engagement with your work, by anyone, is
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1="[\$CurDir] "