Skip to content

Instantly share code, notes, and snippets.

Tim Osborn ptim

Block or report user

Report or block ptim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ptim
ptim / CSS-structure.md
Created Aug 3, 2018
Links from a discussion held during the Melb Django Peer to Peer Learning Night on 2018-08-02 at Commoncode
View CSS-structure.md
View keybase.md

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 / .pdbrc
Last active Nov 12, 2015 — forked from reebalazs/.pdbrc
.pdbrc working with ipdb and PdbSublimeTextSupport
View .pdbrc
# http://stackoverflow.com/questions/12723375/python-line-highlight-on-sublime-text-2-from-ipdb
import pdb
from PdbSublimeTextSupport import preloop, precmd
pdb.Pdb.preloop = preloop
pdb.Pdb.precmd = precmd
try:
from ipdb.__main__ import Pdb as ipdb_Pdb
except ImportError:
@ptim
ptim / readme.md
Last active Jun 6, 2018
Browsersync.io 'alias'
View readme.md

This handy 'alias' is actually a bash function allowing you to run bs from the directory you want to serve, giving you a dev server, with live reload, directory indexes, and the goodness of sync'd scrolling across multiple devices!

It prints out the command that's run and a link to the docs so that I don't completely forget what I'm actually doing!

bs() {
    echo
    echo "browser-sync start --server --directory --files \"**\""
    echo "http://www.browsersync.io/docs/command-line/"
    echo
    browser-sync start --server --directory --files "**"
@ptim
ptim / index.html
Last active Sep 25, 2015
Sheetsu and d3.js
View index.html
<!DOCTYPE html>
<html>
<head>
<title>D3 Sheetsu</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
* {
box-sizing: border-box;
}
body {
View 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 / ST3-paste-path.py
Last active Aug 29, 2015
ST3: Paste the current file's Relative Path From Project (Encoded). Requires https://github.com/titoBouzout/SideBarEnhancements be installed
View ST3-paste-path.py
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 / SaveAs-UTF8.py
Created Mar 12, 2014
ST3 super simple plugin: Save the current file with encoding UTF8, then close.
View SaveAs-UTF8.py
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
You can’t perform that action at this time.