Skip to content

Instantly share code, notes, and snippets.

View jathanism's full-sized avatar
🍕
See below.

Jathan McCollum jathanism

🍕
See below.
View GitHub Profile
@jathanism
jathanism / 0_reuse_code.js
Created August 19, 2014 16:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
from tastypie.validation import FormValidation
class InstanceFormValidation(FormValidation):
def is_valid(self, bundle, request=None):
errors = {}
data = bundle.data
instance = bundle.obj
from django.core.exceptions import MiddlewareNotUsed
from django.conf import settings
import cProfile
import pstats
import marshal
from cStringIO import StringIO
class ProfileMiddleware(object):
def __init__(self):
if not settings.DEBUG:

found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to http://192.168.0.1 and login with “admin” / “motorola”
  5. Now you will make some changes:
 
  • Wireless -> Primary Network -> Disabled
@jathanism
jathanism / gist:2472893
Created April 23, 2012 18:26 — forked from akoumjian/gist:1625633
Tastypie One Time Retrieval Resource Using Celery Task as object_class
class TempResource(Resource):
class Meta:
resource_name = 'temp_resource'
object_class = temp_resource.delay
authorization = Authorization()
allowed_methods = ['post', 'get']
always_return_data = True
def get_resource_uri(self, bundle_or_obj):
"""
@jathanism
jathanism / .vimrc
Created April 19, 2012 23:40 — forked from averyvery/.vimrc
Tweaked Vim minimap
function! ToggleMinimap()
if exists("s:isMini") && s:isMini == 0
let s:isMini = 1
else
let s:isMini = 0
end
if (s:isMini == 0)
@jathanism
jathanism / wl_snmpd.sh
Created October 7, 2011 16:16 — forked from anonymous/wl_snmpd.sh
simple script to run a triggered snmp command get to wifi client info
#!/bin/sh
place=".1.3.6.1.4.1.2021.255"
refresh() {
id=1
lastid=0
noise_reference=$(wl -i `nvram get wl0_ifname` noise | cut -d" " -f3)
@jathanism
jathanism / diff.py
Created September 23, 2011 13:39 — forked from readevalprint/diff.py
Django instance Diff - Now it's the bestestest.
#!/usr/bin/env python
class Missing:
pass
def diff(instance1, instance2=None, missing_field=None):
'''
Compares two instances and returns a dictionary of
the different fields and a tuple of the corrisponding values.