Skip to content

Instantly share code, notes, and snippets.

View davelab6's full-sized avatar
🤓
Obsessed with variable fonts

Dave Crossland davelab6

🤓
Obsessed with variable fonts
View GitHub Profile

Star Wars opening crawl from 1977

I freaking love Star Wars, but could not find a web version of the original opening crawl from 1977. So I created this one.

I wrote an article where I explain how this works. Watch the Start Wars opening crawl on YouTube.

Stuff I used:

  • CSS (animation, transform)
  • HTML audio (the opening theme)
#!/usr/bin/python
# -*- coding: utf-8 -*-
from fontTools import ttLib
def writeFont(font, filename):
font.save(filename)
print "Wrote font to", filename
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
from __future__ import division
from mutatorMath.objects.location import Location
from mutatorMath.objects.mutator import buildMutator
"""
Simple demo that can be run in Drawbot
http://www.drawbot.com

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
@davelab6
davelab6 / roboto_name_fix.py
Last active May 24, 2016 16:22 — forked from codeman38/roboto_name_fix.py
Fix Windows compatible naming in Roboto font weights
#!/usr/bin/env python2.7
"""Update the 'name' table in the extra Roboto weights to be
more compatible with Windows' font chooser."""
__author__="codeman38"
import argparse
import glob
import os
from fontTools import ttLib
from mojo.events import addObserver
from AppKit import NSSound, NSURL
path = u"http://soundbible.com/grab.php?id=1995&type=mp3"
url = NSURL.URLWithString_(path)
sound = NSSound.alloc().initWithContentsOfURL_byReference_(url, False)
class SomeMotivation(object):
@davelab6
davelab6 / pypi-release-checklist.md
Created December 22, 2015 10:42 — forked from audreyfeldroy/pypi-release-checklist.md
My PyPI Release Checklist
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@davelab6
davelab6 / FuzzWindow.py
Created January 4, 2016 22:30 — forked from adrientetar/FuzzWindow.py
Little defconQt scripting examples
from PyQt5.QtWidgets import QDialog, QPushButton, QVBoxLayout
import random
class FuzzDialog(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
layout = QVBoxLayout(self)
fuzzBox = QPushButton("Fuzz", self)
fuzzBox.clicked.connect(self.glyphFuzzer)
layout.addWidget(fuzzBox)
@davelab6
davelab6 / debug.py
Created January 20, 2016 22:10 — forked from sah/debug.py
some handy functions for debugging python code
# Copyright © 2011, 2012, 2013, 2014 Sauce Labs Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in