Skip to content

Instantly share code, notes, and snippets.

tony / Application.root.js
Last active Aug 29, 2015 — forked from isochronous/Application.root.js
Updated for Backbone 1.1, Marionette 1.8.x. Update to use wreqr, bindTo -> listenTo
View Application.root.js
* Creates the primary `Marionette.Application` object that runs the admin framework. Provides a central point
* from which all other sub-applications are started, shown, hidden, and stopped.
tony /
Last active Aug 29, 2015 — forked from ojii/
messages_request() accepts args, kwargs
from contextlib import contextmanager
from import BaseStorage, Message
from django.test.client import RequestFactory
from django.utils.decorators import method_decorator
class TestMessagesBackend(BaseStorage):
def __init__(self, request, *args, **kwargs):
self._loaded_data = []
super(TestMessagesBackend, self).__init__(request, *args, **kwargs)
tony / arch-linux-install
Created Dec 29, 2015 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
tony /
Created Apr 2, 2018 — forked from alonho/
Flask: drop into pdb on exception
def drop_into_pdb(app, exception):
import sys
import pdb
import traceback
# somewhere in your code (probably if DEBUG is True)
tony /
Last active Dec 16, 2019 — forked from sobolevn/
Formatting, check for errors for git packages
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import toml
def read_pipenv_lock():
with open('Pipfile.lock') as lock:
return json.loads(