Skip to content

Instantly share code, notes, and snippets.

[ 7.462511] WARNING: CPU: 1 PID: 203 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:998 amdgpu_bo_unpin.cold+0x0/0x42 [amdgpu]
[ 7.462513] Modules linked in: sd_mod wacom(+) hid_generic usbhid hid amdgpu(+) gpu_sched ttm drm_kms_helper ahci xhci_pci libahci xhci_hcd drm libata igb mxm_
wmi crc32_pclmul dca usbcore scsi_mod ptp crc32c_intel i2c_piix4 mfd_core pps_core i2c_algo_bit usb_common gpio_amdpt wmi gpio_generic button
[ 7.462526] CPU: 1 PID: 203 Comm: systemd-udevd Not tainted 5.4.0-3-amd64 #1 Debian 5.4.13-1
[ 7.462528] Hardware name: System manufacturer System Product Name/PRIME X370-PRO, BIOS 3805 03/06/2018 [ 7.462588] RIP: 0010:amdgpu_bo_unpin.cold+0x0/0x42 [amdgpu]
[ 7.462591] Code: e9 85 5b dc ff 48 c7 c7 68
@blambi
blambi / output.ex
Created November 15, 2015 16:28
yay :D
[[#PID<0.95.0>, #PID<0.96.0>, #PID<0.97.0>, #PID<0.98.0>, #PID<0.99.0>],
[#PID<0.100.0>, #PID<0.101.0>, #PID<0.102.0>, #PID<0.103.0>, #PID<0.104.0>],
[#PID<0.105.0>, #PID<0.106.0>, #PID<0.107.0>, #PID<0.108.0>, #PID<0.109.0>],
[#PID<0.110.0>, #PID<0.111.0>, #PID<0.112.0>, #PID<0.113.0>, #PID<0.114.0>],
[#PID<0.115.0>, #PID<0.116.0>, #PID<0.117.0>, #PID<0.118.0>, #PID<0.119.0>]]
iex(2)> r = Lumpus.World.get_room(w, 1, 1)
#PID<0.101.0>
iex(3)> Lumpus.World.Room.get_tunnels(r)
[#PID<0.96.0>, #PID<0.102.0>, #PID<0.106.0>, #PID<0.100.0>]
@blambi
blambi / gitnotifier.py
Last active August 29, 2015 14:24
A tiny script for displaying desktop notifications on github activity
#!/usr/bin/env python
import feedparser
import notify2
from time import sleep
import cPickle
class SeenCache:
def __init__(self):
try:
self.seen_cache = cPickle.load(open('gitnotify.p'))
@blambi
blambi / metre-test.ino
Last active August 29, 2015 14:12
Simple test of a VU-Metre
#define PWM_CNT 2
int pwm_pins[] = {5, 6};
int value = 0;
boolean falling = false;
void setup() {
Serial.begin(9600);
}
@blambi
blambi / ed.app
Created December 4, 2014 15:00
Perm ED
"""A minimalist try at a text editor"""
class App( Applet ):
caption = u"Ed"
def __init__( self, term ):
Applet.__init__( self, term )
self.text = list()
self.filename = u'unnamed'
self.input = u''
# Blowfish cipher needs 8 byte blocks to work with
def __pad_file(self, file_buffer):
pad_bytes = 8 - (len(file_buffer) % 8)
for i in range(pad_bytes - 1): file_buffer += chr(randrange(0, 256))
# final padding byte; % by 8 to get the number of padding bytes
bflag = randrange(6, 248); bflag -= bflag % 8 - pad_bytes
file_buffer += chr(bflag)
return file_buffer
def __depad_file(self, file_buffer):
pad_bytes = ord(file_buffer[-1]) % 8
@blambi
blambi / gist:6485114
Created September 8, 2013 14:29
What I used to restore my mail from claws-mail imap caches after the servers disk died with to old backups.
#!/usr/bin/env python
from email.parser import Parser
import smtplib
import sys
import os
from hashlib import md5
def sendmail(mail_str):
headers = Parser().parsestr(mail_str)
---
layout: default
title: Just another 15mm miniature blog
---
<div id="home">
{% for post in paginator.posts %}
<div class="post">
<h1>{{ post.title }}</h1>
<div class="posted-date">Posted on {{ post.date | date_to_string }}</div>
@blambi
blambi / gist:5263533
Last active December 15, 2015 12:58
Converting MV2 Inventories from yaml to json files
#!/usr/bin/env python
import sys
import yaml
import json
def convert(infile):
x = yaml.load(open(infile, 'r').read())
print "Converting"
print x
@blambi
blambi / colours.py
Created July 17, 2012 11:59
Little game I made to entertain my one year old on a spare laptop
#!/usr/bin env python
import pygame
from random import randint
d = pygame.display.set_mode( (800, 600) )
pygame.display.toggle_fullscreen()
def rnd_bg():
d.fill(((randint(0, 255), randint(0, 255), randint(0, 255), 255)))