Skip to content

Instantly share code, notes, and snippets.

View ptim's full-sized avatar

Tim Osborn ptim

View GitHub Profile
@ptim
ptim / ST3-paste-path.py
Last active August 29, 2015 13:57
ST3: Paste the current file's Relative Path From Project (Encoded). Requires https://github.com/titoBouzout/SideBarEnhancements be installed
import sublime, sublime_plugin
'''
Paste the current file's Relative Path From Project (Encoded).
Requires https://github.com/titoBouzout/SideBarEnhancements to be installed
First save this file as:
~/Library/Application Support/Sublime Text 3/Packages/User/paste-path.py
More details about writing plugins: http://docs.sublimetext.info/en/latest/reference/plugins.html
@ptim
ptim / updateip.py
Last active August 29, 2015 14:07 — forked from hamsolodev/updateip.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Update Route53 DNS A name record for home IP.
#
# Uses the *route53* library, rather than boto.
from __future__ import print_function
import os
import re
@ptim
ptim / index.html
Last active September 25, 2015 04:44
Sheetsu and d3.js
<!DOCTYPE html>
<html>
<head>
<title>D3 Sheetsu</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
* {
box-sizing: border-box;
}
body {

Keybase proof

I hereby claim:

  • I am ptim on github.
  • I am ptim (https://keybase.io/ptim) on keybase.
  • I have a public key whose fingerprint is 8E20 8EE9 592E 7398 4BFD 353A A23A 0AB9 2D63 AE7E

To claim this, I am signing this object:

@ptim
ptim / esnextbin.md
Last active December 14, 2016 12:52
esnextbin sketch
@ptim
ptim / SaveAs-UTF8.py
Created March 12, 2014 11:59
ST3 super simple plugin: Save the current file with encoding UTF8, then close.
import sublime, sublime_plugin
'''
A response to: http://stackoverflow.com/questions/19831757/how-to-create-macro-in-sublime-text-3-with-saveas-and-close-file-command
Save the current file with encoding UTF8, then close.
To trigger the command with 'Command Option Shift 8',
add the following to your Sublime Text > Preferences > Keybindings - User
@ptim
ptim / CSS-structure.md
Created August 3, 2018 00:49
Links from a discussion held during the Melb Django Peer to Peer Learning Night on 2018-08-02 at Commoncode
@ptim
ptim / airbus_data.tsv
Created December 3, 2019 12:54 — forked from atmccann/airbus_data.tsv
Animated path multi-series line chart
date Airbus Boeing
2000-07-31 0 0
2000-08-31 -0.884 9.8912
2000-09-29 9.6685 32.1383
2000-10-31 32.5967 38.9245
2000-11-30 33.1492 41.4853
2000-12-29 30.7182 35.2113
2001-01-31 27.0718 19.8464
2001-02-28 24.3094 27.4264
2001-03-30 16.0773 14.1306
@ptim
ptim / db-open
Created February 22, 2020 03:41 — forked from helderco/db-open
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
@ptim
ptim / aust.json
Created April 12, 2020 12:21 — forked from GerardoFurtado/aust.json
Australia map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.