Skip to content

Instantly share code, notes, and snippets.

Allen Tan tealtan

Block or report user

Report or block tealtan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tealtan /
Last active Jun 30, 2017
Rules for Text Style Mapping


  "text-styles": [
      "name": "smallscreen-small-headline-hardtone",
      "typeface": "@cheltenham",
      "weight": "700",
      "font-size": "22",
tealtan / fontface
Last active Jun 21, 2017
fontface syntax
View fontface
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'),
url('myfont-webfont.woff2') format('woff2'),
url('myfont-webfont.woff') format('woff'),
url('myfont-webfont.ttf') format('truetype');
tealtan / asdfasdfds.html
Created Jan 22, 2015
Fuego Packery Fix??
View asdfasdfds.html
<script type="text/javascript">
try {
active: function() {
} catch(e) {}
tealtan /
Last active Aug 29, 2015
A pirate radio social network

The thing about half-joking about things is that they sometimes become real. I said something about how the only alternative social network I’d trust now is a system where everyone runs their own secret RSS feeds (with no corresponding web component) and passes them around by word-of-mouth. No discovery, no stars, no pageviews, just semi-public paragraphs.

Ways to get a standalone RSS feed

A range of options, depending on how much you want to do yourself:

  • Use an existing publishing service – preferably something old and boring – that generates its own RSS feeds. Make the web component private. Pass your RSS feed around. Something like Tumblr or Livejournal would work well.
  • Generate your RSS feed with a program on your own computer and put it up somewhere. A static site generator like Jekyll can turn a series of Markdown files into a RSS feed pretty easily, once you set up the template. You can put the generated RSS file into your [Dropbox P
tealtan /
Last active Aug 29, 2015
Guidelines Behind Prose Diffs
  • The units of meaning is not the "line", but the word, sentence, paragraph, section.
  • Editing a word/sentence/paragraph/section is different than moving it elsewhere.
  • If a sentence or paragraph or section changed, you would want to show which specific parts of it changed, instead of highlighting the entire larger unit.
  • It would likely be helpful to show the change in context, possibly as a before/after toggle.
  • Markup would be very difficult to parse. (Open/close tags across sentences, etc.) But markdown would be all right.
  • There are trivial changes, meaningful changes, and then meaningful changes that you want to call out.
  • Adding line breaks don’t matter, unless it forms a new paragraph.
View gist:608af0d6da057c423b4a
allen-tan:usr 204854$ brew update
error: Your local changes to the following files would be overwritten by merge:

This is by no means comprehensive, but are where I’d go:

Noma. It’s no El Bulli, but this is open, so! I love how it looks like a nondescript warehouse from the outside.

The Opera House. Ridiculous inside. (It looks like a pumpkin.) The Royal Danish Ballet and Royal Danish Orchestra both perform here all the time and apparently THE QUEEN comes all the time.

Koncerthuset. It’s a theater with 4 semi-transparent screens for walls. So you can see inside during the day and watch projections on it at night.

tealtan /
Last active Dec 30, 2016
Custom Twitter stylesheet

Custom Twitter Stylesheet

Craig Mod does a bigger overhaul with Twitter for Minimalists, but this will only do the following:

  • Hides promoted tweets and trends
  • Hides the useless “Expand” link that appears under every tweet
  • Tones down the blue conversation line to a barely-visible gray
  • Hides all numbers

You can add this CSS in Safari with this extension. The URL to target is*.

View combine_highlight.rb
module ApplicationHelper
def combine_highlight(selected_text, surrounding_text)
if surrounding_text.include? selected_text
split_text = surrounding_text.split(selected_text)
content_tag(:p, split_text[0].to_s.html_safe + content_tag(:span, selected_text, class:"selected") + split_text[1].to_s.html_safe)
content_tag(:p, surrounding_text, class:"selected")
You can’t perform that action at this time.