Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jkeyes on github.
  • I am jkeyes ( on keybase.
  • I have a public key ASDDMRXzjwn4PPmjtW1Gnt2DD_4vsvg9HeY-3Rn9tU7aQAo

To claim this, I am signing this object:

jkeyes / _vimeo.html
Last active November 16, 2016 20:07
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>
<div class='embed-container'>
<iframe src='{{ scheme }}://{{ video_id }}' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
jkeyes / html5test.rb
Created September 21, 2013 09:01
Nokogiri doesn't appear to support HTML5 validation.
require 'rubygems'
require 'nokogiri'
markup = <<-eom
<!DOCTYPE html>
jkeyes / wercker.yml
Created September 2, 2013 13:48
Heroku Deploy on Wercker
- heroku-deploy
- script:
name: install heroku-exit-status plugin
code: heroku plugins:install
- script:
name: migrate with south
code: heroku run "python migrate" -a $HEROKU_APP_NAME
jkeyes /
Created August 21, 2013 21:00
Docraptor async example
import time
from docraptor import DocRaptor
docraptor = DocRaptor()
print "Create PDF"
# resp = docraptor.create({
# 'document_content': '<h1>python-docraptor</h1><p>Async Test</p>',
# 'test': True,
# 'async': True
jkeyes / wercker.yml
Last active December 18, 2015 13:09
Install lessc on wercker
box: wercker/python
- script:
name: "install lessc with sudo"
code: |-
curl | sudo bash
sudo npm install less -g
- script:
name: "install lessc locally"
jkeyes /
Last active December 14, 2015 17:39
A tagged pre block extension ( The `prettypre` extension inserts 'prettyprint' into the class attribute of the `pre` and if there is an additional token it inserts a language class on the `code` element (a child of `pre`) (2-pre.html). And the result after prettifying (3-pretty-pre.html).
@prettyprint python
class PrettyPreExtension (markdown.Extension):

    def extendMarkdown(self, md, md_globals):
        self.processor = PreTreeprocessor() = md
        self.processor.config = self.getConfigs()
jkeyes /
Last active December 10, 2015 06:18
Updated sample code for the "Stitch It Up" example from "The Little Book of CoffeeScript".
"use strict"
stitch = require("stitch")
express = require("express")
argv = process.argv.slice(2)
pkg = stitch.createPackage(
# Specify the paths you want Stitch to automatically bundle up
paths: [ __dirname + "/app"],
jkeyes / acme.rst
Created November 28, 2012 10:21
ReST Hyperlink with Unicode

The following ReST:


.. |Acme(TM)| unicode:: Acme U+2122
.. _Acme(TM):

produces this HTML:


jkeyes /
Created November 21, 2012 13:11 — forked from kennethreitz/
MongoHQ w/ pymongo on Heroku
import os
import pymongo
from urlparse import urlparse
MONGO_URL = os.environ.get('MONGOHQ_URL')
# Get a connection
conn = pymongo.Connection(MONGO_URL)