Skip to content

Instantly share code, notes, and snippets.

@jslabovitz
jslabovitz / # xapian - 2016-11-15_11-36-35.txt
Created November 15, 2016 16:41
xapian on macOS 10.12.1 - Homebrew build logs
Homebrew build logs for xapian on macOS 10.12.1
Build date: 2016-11-15 11:36:35
@jslabovitz
jslabovitz / gist:3835672
Created October 4, 2012 18:58
Broken code that should update Mongo document.
#!/usr/bin/env ruby
#
# This is intended to test Mongo's atomic-update operation. It fails; see below.
#
require 'mongomatic'
class VideoGroup < Mongomatic::Base
@jslabovitz
jslabovitz / ruby-enum.rb
Created July 19, 2012 19:39
MacRuby/RubyMotion 'Enum' class & sample code
#!/usr/bin/env macruby
class Enum
def initialize(value)
@value = value
end
def pointer
ptr = Pointer.new(type)
@jslabovitz
jslabovitz / gist:1140179
Created August 11, 2011 16:58
Monospaced programming example
x = {
:foo => 'a phrase', # a comment
:grotz => 'another phrase', # another comment
}
@jslabovitz
jslabovitz / gist:1134879
Created August 9, 2011 18:56
SEGV crash report
Process: ruby [42882]
Path: /Users/USER/*/ruby
Identifier: ruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [32844]
Date/Time: 2011-08-09 11:55:35.926 -0700
OS Version: Mac OS X 10.7 (11A511)
Report Version: 9
@jslabovitz
jslabovitz / gist:1134865
Created August 9, 2011 18:48
Test script for adding/replacing attributes
#!/usr/bin/env ruby
# Run this like so:
# ./test-standalone.rb WINV_FRENCHDECO_CMYK_01_W2P_FXG.fxg
require 'rubygems'
require 'nokogiri'
class Processor
(This is built with --disable-llvm, using gcc 4.4.3 on Ubuntu 10.04 on a Beagleboard [http://beagleboard.org] with an ARM chip.)
CC vm/test/runner.cpp
gcc -Ivm/external_libs/libtommath -Ivm/external_libs/libgdtoa -Ivm/external_libs/onig -Ivm/external_libs/libffi/include -Ivm/external_libs/libltdl -Ivm/test/cxxtest -Ivm -I. -I/usr/local/include -pipe -Wall -Wno-deprecated -DHAS_EXECINFO -ggdb3 -Werror -DRBX_PROFILER -fno-inline -DRBX_DEBUG -c -o vm/test/runner.o vm/test/runner.cpp 2>&1
{standard input}: Assembler messages:
{standard input}:124244: Warning: end of file not at end of a line; newline inserted
{standard input}:124659: Error: undefined symbol `.LLSDATT4250' in operation
{standard input}:124662: Error: undefined symbol `.LLSDACSE4250' in operation
gcc: Internal error: Killed (program cc1plus)
Please submit a full bug report.