Skip to content

Instantly share code, notes, and snippets.

View thomasjbradley's full-sized avatar
🐢
Saving dinosaurs

Thomas J Bradley thomasjbradley

🐢
Saving dinosaurs
View GitHub Profile
@thomasjbradley
thomasjbradley / LICENSE
Last active September 1, 2020 05:11
Swiper—a really basic left/right swiping event handler that tries to be helpful and not interfere with up/down scrolling.
MIT License
Copyright (c) 2017 Thomas J Bradley
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@thomasjbradley
thomasjbradley / Quick Pin to Pinboard.alfredworkflow
Last active August 29, 2015 14:25
An Alfred workflow for quick pinning to Pinboard.

Keybase proof

I hereby claim:

  • I am thomasjbradley on github.
  • I am thomasjbradley (https://keybase.io/thomasjbradley) on keybase.
  • I have a public key whose fingerprint is CE69 0D3C 8E37 6BD9 538B 9EDA 3154 4923 0C25 CE99

To claim this, I am signing this object:

@thomasjbradley
thomasjbradley / github-issues.js
Created October 4, 2014 19:24
Opens the GitHub Issues page for the current repo in a new tab
/**
* Opens the GitHub Issues page for the current repo in a new tab
*/
javascript:(function () {
var url = document.location.href, finalUrl;
if (!url.match(/github/)) { return; }
finalUrl = url.match(/https\:\/\/github\.com\/[^\/]+\/[^\/]+/)[0];
@thomasjbradley
thomasjbradley / github-pages-bookmarklet.js
Last active February 23, 2017 11:11
GitHub Pages Switcher Bookmarklet
/**
* Detects the GitHub URL and redirects:
* - From Repo to Pages
* - or from Pages to Repo
*/
javascript:(function () {
var url = document.location.href,
username,
repo,
@thomasjbradley
thomasjbradley / slideshow-to-dvd
Last active August 29, 2015 14:02
Slideshow to DVD: Takes a folder of images and converts them into an MP4 and DVD slideshow.
#!/usr/bin/env node
/**
* # Slideshow to DVD
*
* Takes a folder of images and converts them into an MP4 and DVD slideshow.
* Will resize and crop images to 720p (1280x720).
* Expects music to be AAC M4A, though will likely work with other formats using the -m flag.
*
* ## Installation
@thomasjbradley
thomasjbradley / template.html
Last active December 21, 2015 07:49
Convert a series of Markdown files for a novel into a manuscript using PDFCrowd, MultiMarkdown, and YAML.
<!DOCTYPE html>
<html lang="en-ca">
<head>
<meta charset="utf-8">
<title>{{header}}</title>
<style>
body {
margin: 0;
padding: 0;
@thomasjbradley
thomasjbradley / 1-generate-private-key.sh
Created January 21, 2013 02:36
The four steps to making a self-signed SSL certificate
#!/usr/bin/env bash
openssl genrsa -des3 -out server.key 1024
@thomasjbradley
thomasjbradley / httpd-vhosts.conf
Created January 21, 2013 02:32
Dynamic vhost setup with Apache
NameVirtualHost *:80
NameVirtualHost *:443
<Virtualhost *:80>
VirtualDocumentRoot /www/%1
UseCanonicalName Off
SetEnv ENV dev
ServerName vhosts.dev
ServerAlias *.dev
ServerAlias *.xip.io