Skip to content

Instantly share code, notes, and snippets.

View myles's full-sized avatar
🦖

Myles Braithwaite myles

🦖
View GitHub Profile
@myles
myles / Makefile
Created August 22, 2016 12:46 — forked from toolmantim/Makefile
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@myles
myles / pptx-to-png.sh
Last active November 9, 2017 18:23
Convert a bunch of PowerPoint files to PNG files.
for pptx in *.pptx;
do
libreoffice --headless --convert-to pdf $pptx
convert -density 400 `basename $pptx`.pdf -resize 2000x1500 `basename $pptx`%d.jpg
rm `basename $pptx`.pdf
done
@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.