Skip to content

Instantly share code, notes, and snippets.

@pfig
pfig / gist:0508a1c735e1b0bf6219
Created April 5, 2015 01:33
5-star album reviews from The Guardian
# cf http://www.theguardian.com/info/developer-blog/2015/feb/10/what-to-listen-to-next-jq-to-the-rescue
URL='http://content.guardianapis.com/search?api-key=test&page-size=100&show-fields=starRating&tag=tone/albumreview,tone/reviews&from-date=2015-01-03'
curl -s $URL | jq \
'[.response.results[] | select((.fields.starRating | tonumber) == 5) | {webTitle, webUrl}]'

Keybase proof

I hereby claim:

  • I am pfig on github.
  • I am pfig (https://keybase.io/pfig) on keybase.
  • I have a public key whose fingerprint is 4A46 D391 411F EB63 1797 119B 66A4 7DA9 0F9F C14A

To claim this, I am signing this object:

<?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>

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

@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');
@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 / 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 / gist:6207330
Created August 11, 2013 23:18
Octopress front matter YAML to support linklog posts
external-url: http://daringfireball.net/
<!-- For Retina display iPads -->
<link href="/assets/images/apple-touch-icon-xlarge.png" rel="apple-touch-icon" sizes="144x144" type="image/png"/>
<!-- For Retina display iPhones with iOS 7-->
<link href="/assets/images/apple-touch-icon-large7.png" rel="apple-touch-icon" sizes="120x120" type="image/png"/>
<!-- For Retina display iPhones -->
<link href="/assets/images/apple-touch-icon-large.png" rel="apple-touch-icon" sizes="114x114" type="image/png"/>
<!-- For iPad 1 -->
<link href="/assets/images/apple-touch-icon-medium.png" rel="apple-touch-icon" sizes="72x72" type="image/png"/>
<!-- For iPhone 3G, iPod Touch, and Android -->
<link href="/assets/images/apple-touch-icon-small.png" rel="apple-touch-icon" type="image/png"/>
@pfig
pfig / compile-nginx.sh
Created April 9, 2012 07:48
Compile nginx
#!/bin/bash
set -e
./configure \
--prefix=/usr/local \
--conf-path=/usr/local/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \