Skip to content

Instantly share code, notes, and snippets.

@pfig
pfig / gist:6207330
Created August 11, 2013 23:18
Octopress front matter YAML to support linklog posts
external-url: http://daringfireball.net/
@pfig
pfig / article.html
Last active December 20, 2015 22:48
{% if page.external-url %}
<a href="{{ page.external-url }}" class="icon-alone">
<span aria-hidden="true" data-icon="&#x25e3;"></span>
<span class="visuallyhidden">External link</span>
</a>
{% endif %}
@pfig
pfig / standalone-fonticon.html
Created September 16, 2013 11:16
HTML setting up an icon and adding the relevant text for screen readers.
<a href="http://example.com" class="icon-alone">
<span aria-hidden="true" data-icon="&#x25e3;"></span>
<span class="visuallyhidden">External link</span>
</a>
@pfig
pfig / fonticons.scss
Created September 16, 2013 11:21
SCSS code to support font icons (including standalone ones).
$fontName: 'Scribbles';
$fontFileName: '../font/Scribbles';
@font-face {
font: {
family: $fontName;
weight: normal;
style: normal;
}
src:url('#{$fontFileName}.eot');

Bacon1 ipsum dolor sit amet short ribs kielbasa beef ribs meatloaf.

In commodo ut, bresaola rump cow culpa aute sirloin pancetta ham. Tail filet mignon laboris pork belly. Laboris ut aute jerky. Dolor duis sunt shoulder jerky qui in anim flank. Tail laboris dolore sunt.

Footnotes

  1. Yes, bacon beats Lorem anytime

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@pfig
pfig / Rakefile
Created March 3, 2012 23:48
Rake task to compile Less to CSS
require 'rubygems'
require 'less'
require 'rake'
SOURCE = "."
LESS = File.join( SOURCE, "path", "to", "less", "files" )
CONFIG = {
'less' => File.join( LESS, "less" ),
'css' => File.join( LESS, "css" ),
'input' => "style.less",
@pfig
pfig / pep-20.md
Last active April 27, 2016 09:10
PEP-20

From Tim Peters's Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.

Special cases aren't special enough to break the rules.

@pfig
pfig / rain.scd
Created October 10, 2016 22:00
A crude driver for my attempts at phase music
s.quit;
s.boot;
(
b = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "press_the_red_again.wav");
k = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "kissy_face.wav");
m = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "notice_me_senpai_short.aiff");
// Create a Synth capable of all the transforms we want
SynthDef(\reich, {
@pfig
pfig / compose.py
Created December 20, 2016 22:26 — forked from TomWhitwell/compose.py
Python script to generate random scores for modular synth
import random
import string
# -*- coding: utf-8 -*-
def randomname(length = 6):
vowels = ['a','e','i','o','u','']
consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z']
a = random.sample(consonants,length/2)
x = 1