This file contains hidden or 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
class SearchableBaseModel(BaseModel): | |
""" | |
Subclasses of this are required to implement: | |
searchable_fields | |
A list of fields to do general search on, used for | |
ordering results as well. | |
""" | |
_aggregate_searchable_field = models.TextField(blank=True, null=True, editable=False, db_index=True) | |
searchable_fields = [] |
This file contains hidden or 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
@classmethod | |
def finish_sequencing_on(cls, when, dot=None, only=None, split_printing_at=300): | |
if only is not None: | |
pick_sets = (only,) | |
else: | |
pick_sets = cls.pick_sets_on(when) | |
seq = 0 | |
for p in sorted(pick_sets, key=lambda p: p.sequence): | |
seq = p.finish_sequencing(sequence_start=seq) | |
if dot: |
This file contains hidden or 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 functools import wraps | |
from django.conf import settings | |
class cached_property(object): | |
"""A read-only @property that is only evaluated once. The value is cached | |
on the object itself rather than the function or class; this should prevent | |
memory leakage.""" | |
def __init__(self, fget, doc=None): | |
self.fget = fget |
This file contains hidden or 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
http://ubuntuforums.org/showthread.php?t=726724 |
This file contains hidden or 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/env python | |
import RPi.GPIO as gpio | |
from time import sleep | |
import re | |
import sys | |
gpio.setmode(gpio.BCM) | |
red = 23 | |
yel = 24 |
This file contains hidden or 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
Jul 17 22:46:00 insomnia systemd[1]: Starting Tenyks... | |
Jul 17 22:46:00 insomnia systemd[1]: Started Tenyks. | |
Jul 17 22:46:00 insomnia sudo[7519]: pam_unix(sudo:session): session closed for user root | |
Jul 17 22:46:00 insomnia tenyks[7522]: Traceback (most recent call last): | |
Jul 17 22:46:00 insomnia tenyks[7522]: File "/usr/bin/tenyks", line 9, in <module> | |
Jul 17 22:46:00 insomnia tenyks[7522]: load_entry_point('tenyks==0.1.24', 'console_scripts', 'tenyks')() | |
Jul 17 22:46:00 insomnia tenyks[7522]: File "/usr/lib/python2.7/site-packages/tenyks-0.1.24-py2.7.egg/tenyks/core.py", line 208, in main | |
Jul 17 22:46:00 insomnia tenyks[7522]: print(startup_banner()) | |
Jul 17 22:46:00 insomnia tenyks[7522]: File "/usr/lib/python2.7/site-packages/tenyks-0.1.24-py2.7.egg/tenyks/banner.py", line 58, in startup_banner | |
Jul 17 22:46:00 insomnia tenyks[7522]: redis_status=get_redis_status()) |
This file contains hidden or 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
kyle@robodance:~$ cat .tmux.conf | |
# Set escape char to Ctrl-J | |
# set-option -g prefix C-j | |
# unbind-key C-b | |
# bind-key C-j send-prefix | |
source ~/.tmux-keybinding.conf | |
# easy window splitting | |
unbind % | |
bind | split-window -h |
This file contains hidden or 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
http://www.amazon.com/Hacking-The-Art-Exploitation-Edition/dp/1593271441/ref=sr_1_1?ie=UTF8&qid=1375910776&sr=8-1&keywords=hacking+the+art+of+exploitation | |
http://www.amazon.com/Reversing-Secrets-Engineering-Eldad-Eilam/dp/0764574817/ref=sr_1_1?s=books&ie=UTF8&qid=1375910810&sr=1-1&keywords=reversing | |
http://www.amazon.com/Guide-Kernel-Exploitation-Attacking-Core/dp/1597494860/ref=sr_1_1?s=books&ie=UTF8&qid=1375910830&sr=1-1&keywords=kernel+exploitation | |
http://www.amazon.com/Practical-Malware-Analysis-Hands--Dissecting/dp/1593272901/ref=sr_1_1?s=books&ie=UTF8&qid=1375910868&sr=1-1&keywords=practical+malware+analysis |
This file contains hidden or 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
#!/bin/bash | |
BACKUP_BASE_DIR=/home/kyle/backups | |
BACKUP_FS_MANIFEST=/etc/backups/fs_manifest | |
BACKUP_DB_MANIFEST=/etc/backups/db_manifest | |
TODAY_DATE=$(date "+%Y%m%d") | |
TODAY_DIR=${BACKUP_BASE_DIR}/${TODAY_DATE} | |
logger() { |
This file contains hidden or 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
[user] | |
name = Kyle Terry | |
email = <REDACTED> | |
token = <REDACTED> | |
[github] | |
user = kyleterry | |
[color] | |
diff = True |