Skip to content

Instantly share code, notes, and snippets.

View reefdog's full-sized avatar

Justin Reese reefdog

View GitHub Profile
@reefdog
reefdog / search-embed-example.html
Created February 18, 2016 21:32
Example of DocumentCloud search embed code
<div id="DC-search-projectid-24031-language-tests" class="DC-search-container"></div>
<script src="//assets.documentcloud.org/embed/loader.js"></script>
<script>
dc.embed.load('http://www.documentcloud.org/search/embed/', {
q: "projectid: 24031-language-tests ",
container: "#DC-search-projectid-24031-language-tests",
title: "",
order: "created_at",
per_page: 12,
@reefdog
reefdog / platformer.js
Last active January 5, 2017 17:45
Redirect static DocumentCloud asset links to the canonical HTML page
/*!
* Platformer
* Redirect static DocumentCloud asset links to the canonical HTML page.
*
* Say you're at `https://assets.documentcloud.org/documents/282753/lefler-thesis.pdf`
* and you want to view the original DocumentCloud page for that document. Click your
* Platformer bookmarklet. It transforms that URL to the URL for the original document
* on documentcloud.org.
*
* To use, create a bookmark with the following address (sans backticks):
@reefdog
reefdog / 160519.html
Last active May 19, 2016 15:32
Recode of Steve Yedlin's RAW letter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Viewing_RAW</title>
<style type="text/css">
@reefdog
reefdog / rails http status codes
Created August 26, 2016 18:37 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@reefdog
reefdog / Text Substitutions.plist
Last active August 3, 2022 19:55
Useful text substitutions for macOS. Install by dragging into "System Preferences > Keyboard > Text" substitution area.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>phrase</key>
<string>★☆☆☆☆</string>
<key>shortcut</key>
<string>/1star</string>
</dict>