Skip to content

Instantly share code, notes, and snippets.

View sixtyfive's full-sized avatar
🐯
Rawrrr.

J. R. Schmid sixtyfive

🐯
Rawrrr.
View GitHub Profile
app/models/cloze_item.rb:13:in `<top (required)>': superclass mismatch for class Text (TypeError)
---
class ClozeItem < ActiveRecord::Base
...
end
class Text < ClozeItem
...
[ 2404.249891] usb 3-1: USB disconnect, address 3
[ 2407.499867] usb 3-1: new full speed USB device using uhci_hcd and address 4
[ 2407.683911] scsi5 : usb-storage 3-1:1.2
[ 2408.710297] scsi 5:0:0:0: Direct-Access Brother MFC-250C 1.00 PQ: 0 ANSI: 2
[ 2408.711055] sd 5:0:0:0: Attached scsi generic sg2 type 0
[ 2408.790263] sd 5:0:0:0: [sdc] Attached SCSI removable disk
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0951:1606 Kingston Technology
Bus 001 Device 004: ID eb1a:2761 eMPIA Technology, Inc. EeePC 701 integrated Webcam
Bus 003 Device 004: ID 04f9:01fe Brother Industries, Ltd
@sixtyfive
sixtyfive / gist:1047970
Created June 26, 2011 20:58
Fresh Thunderbird profile folder innards
9v5j9ncg.default
|-- abook.mab
|-- Cache
| |-- 5EBFEDD2d01
| |-- _CACHE_001_
| |-- _CACHE_002_
| |-- _CACHE_003_
| `-- _CACHE_MAP_
|-- cert8.db
|-- compatibility.ini
@sixtyfive
sixtyfive / gist:1051015
Created June 28, 2011 12:18
YouTube error message I'm seeing right now
500 Internal Server Error
Sorry, something went wrong.
A team of highly trained monkeys has been dispatched to deal with this situation.
If you see them, show them this information:
ERxsqbo26bnjqWyKfaIa6QRnAphslBuKjsIEpu31whTmc0zV5OJHpJCtnPJR
qFRtJOnVML61XBtgnBsCZbUzMHfQ0avmr96h5Tlaqm3wWkCvMx0g7WSqbHsW
77VUV7NDahfr9U6ML1aSyLJTRDq-d2pIzquZo5PF-_aTdX6uEkdN8DTYibWV
@sixtyfive
sixtyfive / gist:1071550
Created July 8, 2011 10:36
ThinkPad X220 lsusb output
[muaddib@rih ~]$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 004: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
@sixtyfive
sixtyfive / gist:1071556
Created July 8, 2011 10:39
ThinkPad X220 lspci output
[muaddib@rih ~]$ sudo lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB Controller: Intel Corporation 6 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 5 (rev b4)
@sixtyfive
sixtyfive / gist:1087900
Created July 17, 2011 18:28
Ugly method for making a nested hash
def build_results_array(start_date, end_date, user)
res = {}
years = Year.date_range_scoped_by_user(start_date, end_date, user)
res[:years] = {}
for year in years do
puts "*** adding year"
res[:years][year.name] = {:id => year.id}
months = Month.date_range_scoped_by_user_and_year(start_date, end_date, user, year)
res[:years][year.name][:months] = {}
for month in months do
def remaining_time
if started_at
ends_at = (started_at + allowed_time.minutes)
min, sec = ((ends_at - Time.now)).divmod(60)
return [min / 60, sec]
end
end
setInterval(function() {
$.get('/runs?info=started', function(started) {
if (started == 'true') {
$.get('/runs?info=first_exercise'), function(url) { // This here
alert(url); // does not
}); // work... :-(
} else {
alert("Has not started yet...")
}
});