Skip to content

Instantly share code, notes, and snippets.

View destroytoday's full-sized avatar

Jonnie Hallman destroytoday

View GitHub Profile
@destroytoday
destroytoday / bookmarklet.js
Last active March 22, 2021 18:39
Bookmarklet to scrape Amazon book pages
var imgRegexp = new RegExp("(http://ecx\.images-amazon\.com\/images\/[A-Z]\/[A-Za-z0-9%]+)\..+(\.jpg)");
var doc = document
, obj = { meta: [], taxonomy: [] };
// ------------------
// cover asset
// ------------------
var img = doc.querySelector('#main-image, #imgBlkFront');
if (img) obj.assets = [img.src.replace(imgRegexp, "$1$2")];
@destroytoday
destroytoday / martin.html
Created September 17, 2013 18:43
Martin page body in HTML
<h1>About Martin</h1>
<p>Martin is a GitHub pages theme by <a href="http://twitter.com/house">Allison House</a>, named for the punchcutter William Martin. To use it, just <a href="https://github.com/house/martin/fork">fork this project</a> and replace my content with your own. This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License.</a></p>
<h1>Style examples</h1>
<h2>Blockquote</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<blockquote>
<p>You know, there are some words I've known since I was a schoolboy. "With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." Those words were uttered by Judge Aaron Satie as wisdom and warning. The first time any man's freedom is trodden on, we're all damaged.</p>
@destroytoday
destroytoday / martin
Last active December 23, 2015 07:09
Martin content rewritten in Markdown.
# About Martin
Martin is a theme by [Allison House](http://twitter.com/house), ported to [Siteleaf](http://siteleaf.com) by [Jonnie Hallman](http://twitter.com/destroytoday). The theme is named for the punchcutter William Martin, apprentice to John Baskerville.
To use it, just [download the theme zip](https://github.com/destroytoday/martin-for-siteleaf/archive/master.zip) and upload it to your [Siteleaf](http://siteleaf.com) site. Create a page for the body content and a `description` meta field for the tagline. Then, add the following site meta fields:
| key | example | required |
| ------------- | ----------------------------- | --------- |
| github_user | destroytoday | yes |
| github_repo | martin-for-siteleaf | yes |
#Based on Don Southard's "Share with Dropbox" script
#http://dirtdon.com
#Change this to your CloudApp Username
CLOUD_USERNAME="derp"
#Change this to your CloudApp Password
CLOUD_PASSWORD="derp"
URL=`pbpaste`
dropbox_url="http://dl.dropbox.com/u/121678/gifs/"
echo -ne ${dropbox_url}$(basename {query}) | pbcopy
@destroytoday
destroytoday / gear.md
Last active October 10, 2015 21:28
Photo gear

For Sale (All Canon, unless noted otherwise)

  • 5D MK II body - $1300
  • 16-35mm 2.8L MK II - $1300
  • 17-40mm 4L - $600
  • 40mm 2.0 (Voigtlander) - $350
  • 50mm 1.2L - $1300
  • 60mm 2.8 macro - $300
  • 65mm 2.8 1-5x macro (w/ twin macro flash) - $1300
  • 25 II extension tube - $100
  • Gitzo GM2541 monopod - $150
This is definitely not a test, sir.
require 'spec_helper'
describe TwitterFriendsHelper do
login_user
describe 'getFriendsIDs' do
context 'one page of friends' do
it 'should return ids' do
ids_response = loadJSONFixture('twitter/friends_ids/single_page.json')
Twitter.stub!(:friend_ids).and_return(ids_response)
@destroytoday
destroytoday / router-facepalm.js.coffee
Created April 5, 2012 13:01
Backbone.js facepalm
class AppRouter extends Backbone.Router
routes:
'users/:user': user
user: (user) ->
console.log 'navigated to user:', user
router = new AppRouter
Backbone.history.start { pushState: true }