Skip to content

Instantly share code, notes, and snippets.

View kyleterry's full-sized avatar

Kyle Terry kyleterry

View GitHub Profile
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 = []
@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:
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
http://ubuntuforums.org/showthread.php?t=726724
#!/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
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())
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
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
#!/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() {
[user]
name = Kyle Terry
email = <REDACTED>
token = <REDACTED>
[github]
user = kyleterry
[color]
diff = True