Skip to content

Instantly share code, notes, and snippets.

500 Internal Server Error
undefined method `info' for nil:NilClass (NoMethodError)
.../misc/tdiary/core/tdiary.rb:337:in `debug'
.../misc/tdiary/core/tdiary/filter/spam.rb:179:in `black_domain?'
.../misc/tdiary/core/tdiary/filter/spam.rb:167:in `each'
.../misc/tdiary/core/tdiary/filter/spam.rb:167:in `black_domain?'
.../misc/tdiary/core/tdiary/filter/spam.rb:191:in `black_url?'
.../misc/tdiary/core/tdiary/filter/spam.rb:186:in `scan'
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU 0/0x0 -> Node 0
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
using C1E aware idle routine
ACPI: Core revision 20081204
Setting APIC routing to flat
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ stepping 02
@zunda
zunda / up.txt
Created November 28, 2009 22:58
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU 0/0x0 -> Node 0
tseg: 0000000000
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
using C1E aware idle routine
SMP alternatives: switching to UP code
Freeing SMP alternatives: 36k freed
ACPI: Core revision 20081204
--- smp.txt 2009-11-28 13:25:20.000000000 -1000
+++ up.txt 2009-11-28 13:24:27.000000000 -1000
@@ -20,15 +20,17 @@
last_pfn = 0x2ff80 max_arch_pfn = 0x100000000
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
init_memory_mapping: 0000000000000000-000000002ff80000
+ 0000000000 - 002fe00000 page 2M
+ 002fe00000 - 002ff80000 page 4k
+kernel direct mapping tables up to 2ff80000 @ 10000-13000
last_map_addr: 2ff80000 end: 2ff80000
set term push
set output 'distribution2009.png'
set term png transparent small size 320,240
set xdata time
set timefmt "%H:%M:%S"
set xtics 7200
set mxtics 4
set xlabel 'Chip time (hh:mm)'
set ylabel 'Finishers (/sec)'
$ ruby -v test.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
["image", "# src = map.gif\n# relative_height = 100\n"]
["image\r", "# src = map.gif\r\n# relative_height = 100\r\n"]
@zunda
zunda / Error message from Aldiko
Created July 13, 2010 07:10
AldikoでIPA明朝を表示しようとした時にddmsで見られたJavaのスタックトレースの一部 ref https://twitter.com/zundan/status/18418994201
07-12 21:08:19.246: ERROR/FileSystemContentProvider(5743): Error finding: file:////data/data/com.aldiko.android/files/.cache/1279004898133/OEBPS/Fonts/ipaexmsub.ttf
07-12 21:08:19.246: ERROR/FileSystemContentProvider(5743): java.io.FileNotFoundException
@zunda
zunda / gist:962017
Created May 9, 2011 03:40
Avoid `gotest: "./8.out -test.short=true -test.timeout=120" failed: exit status 1'
diff -r d454f1d43ab0 src/pkg/image/decode_test.go
--- a/src/pkg/image/decode_test.go Sun May 08 17:26:16 2011 -0700
+++ b/src/pkg/image/decode_test.go Sun May 08 17:39:34 2011 -1000
@@ -11,7 +11,7 @@
"testing"
// TODO(nigeltao): implement bmp decoder.
- _ "image/gif"
+// _ "image/gif"
_ "image/jpeg"
@zunda
zunda / gist:1003762
Created June 2, 2011 01:42
あるディレクトリ以下に存在するパスを、文字列の配列として返す
class Dir
def Dir.paths(dirname)
r = Array.new
Dir.foreach(dirname) do |entry|
next if '.' == entry or '..' == entry
path = File.join(dirname, entry)
unless File.directory?(path)
r << path
else
r += Dir.paths(path)
Index: hiki/util.rb
===================================================================
--- hiki/util.rb (revision 1101)
+++ hiki/util.rb (working copy)
@@ -61,7 +61,7 @@
# # => "%27Stop%21%27+said+Fred"
def escape(string)
string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
- '%' + $1.unpack('H2' * $1.size).join('%').upcase
+ '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase