Skip to content

Instantly share code, notes, and snippets.

View myles's full-sized avatar
🦖

Myles Braithwaite myles

🦖
View GitHub Profile
@myles
myles / playing.py
Last active February 5, 2019 20:28
Get the current track playing in iTunes on OS X
#!/usr/bin/env python3
import subprocess
def osascript(script):
"""
This is a bridge between Python and AppleScript using the `osascript`
comamnd line app.
"""
location /.well-known/acme-challenge {
root /usr/share/nginx/html;
}
# h5bp is from https://github.com/h5bp/server-configs-nginx
include h5bp/directive-only/ssl.conf;
ssl_certificate /etc/letsencrypt/live/bear.mylesbraithwaite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/bear.mylesbraithwaite.com/privkey.pem;
Verifying that +mylesb is my blockchain ID. https://onename.com/mylesb
mylesb.ca@1.0.0 /Users/Myles/WebSites/ca_mylesb_www
├─┬ assemble@0.7.6
│ ├─┬ ansi-colors@0.1.0
│ │ ├─┬ ansi-bgblack@0.1.1
│ │ │ └── ansi-wrap@0.1.0
│ │ ├── ansi-bgblue@0.1.1
│ │ ├── ansi-bgcyan@0.1.1
│ │ ├── ansi-bggreen@0.1.1
│ │ ├── ansi-bgmagenta@0.1.1
│ │ ├── ansi-bgred@0.1.1
@myles
myles / twtxt.txt
Created February 6, 2016 21:02
Add a twtxt feed to your Jekyll website.
---
layout: null
sitemap: false
permalink: twtxt.txt
---
{% for post in site.posts limit:10 %}{{ post.date | date_to_xmlschema }} {{ post.title }} {% if post.shorturl %}{{ post.shorturl }}{% else %}{{ post.url | prepend: site.baseurl | prepend: site.url }}{% endif %}
{% endfor %}
@myles
myles / keybase.md
Last active December 28, 2022 19:59
keybase.md

Keybase proof

I hereby claim:

  • I am myles on github.
  • I am myles (https://keybase.io/myles) on keybase.
  • I have a public key ASDdUR3w8haibPH-nGAJrwbnYONKwSQVACkpDwI1wM7qrAo

To claim this, I am signing this object:

@myles
myles / out-of-office.txt
Last active December 20, 2015 03:32
Out of Office Template
I am currently out of the office on vacation until the <%= return_date %>.
I know I'm supposed to say that I'll have limited access to email and won't be
able to respond until I return, but that's not true. My iPhone will be with me
and I can respond if I need to. And I recognize that I'll probably need to
interrupt my vacation from time to time to deal with something urgent.
If you need urgent assistance you can *text me* at <%= mobile_phone %>.
Otherwise, I'll respond when I return...
@myles
myles / pre-flight-checcklist.markdown
Created November 27, 2015 20:17
Pre-Flight Checklist

57 Little Things to Double Check Before Your Website Launch

Page Content

  • Web copywriting has been proofread. Spelling and grammar are correct.
  • Paragraphs, headers, lists, and other formatting are correct.
  • Copyright date (perhaps in the footer) includes the current year.
  • Company contact details are accurate throughout the website.
  • Generic content, such as lorem ipsum, has been properly removed and replaced.
  • Images are in the correct places, formatted and working on all devices.
@myles
myles / toronto-homebrew-hosting-club.markdown
Created September 8, 2015 18:27
Toronto Homebrew Hosting Club

Toronto Homebrew Hosting Club

Are you building your own website? Setup and running a shared calendar/contacts? Developing your own publishing web app? Hosting a Gnu-based-social-network? Running your own Wiki? Hosting your own email server? Did you buy a $35 VPS and looking to host anything on it? Or some other digital magic-cloud service?

If so, I'm interested in starting a meetup of people in the Greater Toronto Area passionate about self hosting, in the same structure as the Homebrew Computer Club meetings in Silicon Valley (and the Homebrew Website Club). It will be a gathering of like-minded people to swap ideas, talk shop, and general awesomeness about hosting your own infrastructure.

@myles
myles / typogrify.rb
Created April 10, 2015 21:44
Improves typography on your Jekyll site using typogruby.
require 'typogruby'
module Jekyll
module TypogrifyFilter
# converts a & surrounded by optional whitespace or a non-breaking space
# to the HTML entity and surrounds it in a span with a styled class.
#
# @param [String] text input text
# @return [String] input text with ampersands wrapped
def amp(text)