Skip to content

Instantly share code, notes, and snippets.

new InfoBubble({
arrowPosition: 50,
arrowSize: 10,
arrowStyle: 0,
backgroundClassName: 'property asset small bubble',
backgroundColor: '#FFF',
borderColor: '#F0F0F0',
borderRadius: 3,
borderWidth: 1,
content: $('div#marker_info_#{marker.id}').html(),
@dreamr
dreamr / _form.ejs
Created February 22, 2012 00:53
Why is it that I end up with the ObjectId instead of unit.race -> Race() ?
<div class="clearfix">
<%- form.label("race") %>
<div class="input">
<%- form.input( 'race' ) %>
</div>
</div>
http://www.dreamr.xxx
desc 'Clean up lookups, remove units form values and names'
task :remove_units_from_lookups => :environment do
types = [
:rafter_spacings, :basic_wind_speeds,
:ground_snow_loads, :average_roof_heights
]
types.each do |type|
Lookup.type_of(type).each do |lookup|
next unless lookup.name.scan(/[^\d.]/).any?
main_class = MainClass.new
main_class.extend(MixInA)
class << main_class; undef :say_hello; end
class Thing
def self.say_hello
puts "Hello from ####"
end
class << self
def say_hello
puts "Hello from ####"
end
" Vimrc file, http://phuzz.org
set nocompatible " use vim defaults
set ls=2 " allways show status line
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent
set scrolloff=3 " keep 3 lines when scrolling
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " do incremental searching
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer: amix the lucky stiff
" http://amix.dk - [email protected]
"
" Version: 3.6 - 25/08/10 14:40:30
"
" Blog_post:
" http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc
" Syntax_highlighted:
" http://amix.dk/vim/vimrc.html
d=["2x4","2x6","4x4","4x10","2x8", "2x10"]
d.sort {|a,b| a.split("x") <=> b.split("x")} # doesnt work, nor any variations I can think of
# expected
["2x4","2x6","2x8","2x10","4x4", "4x10"]
tests = [ { :disabled_panels => [] },
{ :disabled_panels => [ [0, 0], [0, 1], [1, 0], [1, 1] ] }
]
tests.each do |test|
context "disabled panels at: #{test[:disabled_panels]}" do
setup do
obj = valid_builder.get_instance
index_states = [
[0,0,false],
[0,1,true],