Skip to content

Instantly share code, notes, and snippets.

View jackjennings's full-sized avatar
⛰️

Jack Jennings jackjennings

⛰️
View GitHub Profile
# Ventriloquist - Build 0.1
# insert a dummy dsig table with unique numbers into .otf fonts
# the idea is to kill two birds with one stone
# this idea needs lots of testing
# to do: add SerialDump[] to a txt file for record keeping
#
# jackson@okaytype.com
from fontTools.ttLib import TTFont
from mojo.compile import *
text = %Q(%%BEGIN_GROUP_TEXT_7
%BEGIN_TEASER
The research on reversibly expandable structures focused ...
%END_TEASER
%BEGIN_EXPANDED
... to understand how to realize structures that can vary in shape and size, was translated into several US patents registered under the name of Charles Hoberman. These patents include precise drawings detailing the overall spatial formations as well as the form and dimension of individual joints and trusses. The exhibited patent 5,024,031 presents a summary of Hoberman’s approach, including spheres and iris domes.
%END_EXPANDED
%%END_GROUP_TEXT
%%BEGIN_GROUP_TEXT_7
# spaceCase - v2.1 - jackson@okaytype.com
from mojo.UI import CurrentSpaceCenter
from mojo.events import addObserver
from vanilla import *
class AddButtonToSpaceCenter:
def __init__(self):
import os
import sys
from vanilla.dialogs import getFile
lib_path = os.path.expanduser("~/Library/Application Support/RoboFont/plugins/FeaturePreview.roboFontExt/lib")
if not lib_path in sys.path: sys.path.append(lib_path)
from featurePreview import FeatureTester
font_file = getFile(messageText="Select font to test features", fileTypes=["ufo"])
import time, random
g = CurrentGlyph()
if g is not None:
path = g.naked().getRepresentation("defconAppKit.NSBezierPath")
xMin, yMin, xMax, yMax = g.box
xMin = int(round(xMin))
yMin = int(round(yMin))
xMax= int(round(xMax))
yMax = int(round(yMax))
import time, random
class Descartes(object):
tries = 10000
def __init__(self, glyph):
self.glyph = glyph
def estimate(self):
@jackjennings
jackjennings / st-code.coffee
Created September 15, 2014 23:15
ST Code Block
SirTrevor.Blocks.Code = SirTrevor.Blocks.Text.extend
type: 'code'
title: 'HTML'
formattable: false
hasTextBlock: false
editorHTML: '<div class="st-required st-text-block st-code-block" contenteditable="true"></div>'
toData: ->
@jackjennings
jackjennings / st-basic-block.coffee
Created September 15, 2014 23:18
st-basic-block
BasicBlock = SirTrevor.Block.extend
template: _.template("""
<header>
<div class='title'><%= title %></div>
</header>
""")
initialize: ->
@$el.addClass 'st-embed'

Keybase proof

I hereby claim:

  • I am jackjennings on github.
  • I am jackjennings (https://keybase.io/jackjennings) on keybase.
  • I have a public key ASAKGofsKvsWcsglbzkZe3SpRosKNIdoqD9zk3QSkBWa9Qo

To claim this, I am signing this object:

class VideoBlock < ActiveRecord::Base
belongs_to :content_block
validates_presence_of :url
validate :is_a_vimeo_link
validates_length_of :title, maximum: 255
before_save :set_video_id