Skip to content

Instantly share code, notes, and snippets.

remote: canceling statement due to conflict with recovery
remote: LINE 1: ...er"."date_joined" FROM "bb_repository" INNER JOIN "auth_user...
remote: ^
remote: DETAIL: User was holding a relation lock for too long.
remote:
@zachsnow
zachsnow / ie-test.html
Last active August 29, 2015 14:05
Angular bootstrap experiment.
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<script src="https://code.angularjs.org/1.3.0-beta.17/angular.min.js"></script>
<script>
var app = angular.module('app', []);
app.controller('ctrl', [
@zachsnow
zachsnow / gist:9946013
Created April 3, 2014 00:19
Balanced STack Track
File "/srv/python-environments/fareharbor/lib/python2.7/site-packages/balanced/resources.py", line 1242, in add_card
self.save()
File "/srv/python-environments/fareharbor/lib/python2.7/site-packages/balanced/resources.py", line 320, in save
resource = method(uri, data=instance_attributes)
File "/srv/python-environments/fareharbor/lib/python2.7/site-packages/balanced/_http_client.py", line 126, in make_absolute_url
return http_op(client, url, **kwargs)
File "/srv/python-environments/fareharbor/lib/python2.7/site-packages/balanced/_http_client.py", line 162, in put
resp = self.interface.put(uri, data=data, **kwargs)
File "/srv/python-environments/fareharbor/lib/python2.7/site-packages/requests/sessions.py", line 387, in put
return self.request('PUT', url, data=data, **kwargs)
@zachsnow
zachsnow / README.md
Last active January 1, 2016 06:09
ngAutoTitle

ngAutoTitle

A collection of directives for managing the <title /> of an AngularJS application.

Usage

  1. Mark the element that you'd like to use as your title with the ng-auto-title directive; usually this will be <title />.
@zachsnow
zachsnow / inline_styles_extension.py
Last active February 9, 2017 04:11
A python-markdown extension for adding inline styles to tags by tag name.
# Caveat emptor and all of that; apologies for mistakes.
class InlineStylesTreeprocessor(Treeprocessor):
"""
A treeprocessor that recursively applies inline styles
to all elements of a given tree.
"""
def __init__(self, styles):
self.styles = styles
@zachsnow
zachsnow / README.md
Last active December 17, 2015 17:39 — forked from bylatt/gist:4971506

This is a test.

It's a simple README.

Sub-test.

Hi.

@zachsnow
zachsnow / document.js
Last active December 16, 2015 16:09
An AngularJS e2e scenario runner DSL construct for immediately accessing the tested application's document. Maybe.
// Return `document` for running application.
angular.scenario.dsl('doc', function(){
return function(){
return this.application.getWindow_().document;
};
});
// Return `jQuery(document.body)` for running application;
// requires you to have included your own copy of jQuery.
var body = function(){