Skip to content

Instantly share code, notes, and snippets.

View justinzane's full-sized avatar

Justin Zane Chudgar justinzane

View GitHub Profile
@justinzane
justinzane / gist:5279867
Created March 31, 2013 07:23
max_rewind_wierdness
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree,
fixing search path.
E: [lt-pulseaudio] main.c: Failed to kill daemon: No such file or directory
E: [pulseaudio] main.c: Failed to kill daemon: No such process
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree,
fixing search path.
W: [lt-pulseaudio] pid.c: Stale PID file, overwriting.
W: [lt-pulseaudio] authkey.c: Failed to open cookie file '/home/justin/.config/p
ulse/cookie': No such file or directory
W: [lt-pulseaudio] authkey.c: Failed to load authorization key '/home/justin/.co
12:58:28 root@justin-4320s:/usr/local/bin/for-chris# cat btrfsck-patch2.log | egrep -v '^root' | egrep -v '^warning'
checking extents
marking 0 dirty
lookup first_block group not found for 4194304
btrfsck repair 619748 counted 207830056960 used
checking fs roots
enabling repair mode
found 207830056960 bytes used err is 0
total csum bytes: 0
total tree bytes: 625098752
@justinzane
justinzane / btrfsck_log
Last active December 12, 2015 06:48
"for_chris" btrfsck --repair
warning, bad space info total_bytes 2147483648 used 40783278080
warning, bad space info total_bytes 3221225472 used 61184372736
warning, bad space info total_bytes 2147483648 used 9766256640
warning, bad space info total_bytes 3221225472 used 11188957184
warning, bad space info total_bytes 4294967296 used 81585467392
warning, bad space info total_bytes 5368709120 used 101985861632
warning, bad space info total_bytes 6442450944 used 122386956288
warning, bad space info total_bytes 7516192768 used 142788050944
warning, bad space info total_bytes 8589934592 used 163189145600
warning, bad space info total_bytes 9663676416 used 183590240256
@justinzane
justinzane / gist:3289905
Created August 7, 2012 22:11
Histogram from django models
##### Assessor.models #####
class Question(models.Model):
text = models.TextField()
explanation = models.TextField()
class Choice(models.Model):
text = models.TextField()
is_correct = models.BooleanField(default=False)
question = models.ForeignKey(Question)
@justinzane
justinzane / gist:3244305
Created August 3, 2012 04:18
from api.py
##### api.py
class UserResource(ModelResource):
def obj_create(self, bundle, request=None, **kwargs):
return super(UserResource, self).obj_create(bundle,
request,
user=request.user)
def apply_authorization_limits(self, request, object_list):
return object_list.filter(pk=request.user.pk)
@justinzane
justinzane / gist:2571533
Created May 1, 2012 21:25
tastypie problem
#models.py
class StoreType(models.Model):
name = models.CharField(max_length=24, unique=True)
class Meta:
ordering = ["name"]
def __unicode__(self):
return ("%24s" % (self.name))
class Store(models.Model):
name = models.CharField(max_length=24)