This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
API commands provided by the module. | |
* reglog config reload # reloads configuration | |
* reglog config set logger <temp> # change logger temporarolly | |
* reglog config show logger # show current logger | |
* reglog config show # show config for current logger | |
* reglog cache <event | all> expire # expire records from all | specific event cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.admin.sites import AlreadyRegistered | |
from django.db.models.loading import get_models | |
for model in get_models(): | |
try: | |
admin.site.register(model) | |
except AlreadyRegistered: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from readonly_form import ReadOnly | |
class MyForm(ReadOnly): | |
""" | |
This form may now add fields as readonly | |
""" | |
class Meta: | |
model = auth.User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Aron Podrigal' | |
from operator import attrgetter | |
from django.db import models, transaction, router | |
from django.db.models import sql, signals | |
from django.db.models.deletion import Collector, ProtectedError | |
from django.db.models.query import QuerySet | |
from django.utils import six | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Script to keep github forked repository in sync with upstream. | |
# synchronizes branches which names match between REMOTE and UPSTREAM | |
# | |
# Uses the following shell variables, maybe passed on the command line | |
# path=/path/to/git/dir upstream=upstream_repo remote=origin ./syncrepository.sh | |
# | |
# Author: Aron Podrigal <[email protected]> | |
# | |
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Generates and prints list of packages that are no longer available on the system from existing apt sources. | |
# | |
# * Ensure your package lists is up-to-date - run apt-get update | |
# | |
# Author: Aron Podrigal <[email protected]> | |
# | |
import os, sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import serializers | |
from django.db.models.manager import Manager | |
from django.db.models.query import QuerySet | |
class LimitQuerySetSerializerFieldMixin: | |
""" | |
Serializer mixin with a special `get_queryset()` method that lets you pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PyAbstractClass | |
PyArgumentEqualDefault | |
PyArgumentList | |
PyAssignmentToLoopOrWithParameter | |
PyAttributeOutsideInit | |
PyAugmentAssignment | |
PyBroadException | |
PyByteLiteral | |
PyCallByClass | |
PyCallingNonCallable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FormCtrl() { | |
this.submit = function(form, method) { | |
var promise = method(function(data, headers) { | |
form.serverErrors = undefined; | |
form.flashMessage("success"); | |
}, function(status, headers, data) { | |
if (status == 400) { | |
form.serverErrors = data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"copy_with_empty_selection": false, | |
"default_line_ending": "unix", | |
"drag_text": false, | |
"enable_telemetry": false, | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": |
OlderNewer