Skip to content

Instantly share code, notes, and snippets.

@Talleyran
Talleyran / gist:1533538
Created December 29, 2011 11:03
configure params for mapserver compiling
./configure --with-gdal=/usr/bin/gdal-config \
--with-ogr=/usr/bin/gdal-config \
--with-wfsclient \
--with-wmsclient \
--with-curl-config=/usr/bin/curl-config \
--with-proj=/usr/ \
--with-tiff \
--with-jpeg \
--with-freetype=/usr/ \
--with-threads \
@Talleyran
Talleyran / fields_object.rb
Created October 30, 2011 11:04
модель FieldsObject
class FieldsObject
include Mongoid::Document
include Mongoid::Timestamps
@@field_types = [
:array,
:big_decimal,
:boolean,
:date,
:date_time,
:float,
@Talleyran
Talleyran / layers_object.rb
Created October 30, 2011 11:01
модель LayersObject
class LayersObject
include Mongoid::Document
include Mongoid::Timestamps
field :geom_id, type: Integer
field :geom_ids, type: Array
embedded_in :layer
embeds_many :fields_objects
@Talleyran
Talleyran / layer.rb
Created October 30, 2011 10:57
модель Layer
class Layer
include Mongoid::Document
include Mongoid::Timestamps
#TODO create geotype filter
field :geotypes, type: Array
field :structure_json, type: String
field :is_spatial, type: Boolean, default: true
field :has_many_geoms, type: Boolean, default: false
@Talleyran
Talleyran / layer_spec.rb
Created October 30, 2011 10:47
spec для описания модели Layer
require 'spec_helper'
def valid_layer_attributes
{ structure: {
f1: :array,
f2: :big_decimal,
f3: :boolean,
f4: :date,
f5: :date_time,
f6: :float,
Sample = function( el )
{
//mixins
var me = Container( el )
//params
//,v1 = ...
//...
//dom elements
module A
def a_xx
end
end
module B
def b_xx
end
end
module A
def a_xx
end
end
module B
def b_xx
end
end
#encoding: utf-8
#Программа написана для ruby 1.9.2
def get_next seq
puts next_seq = seq.split('').inject( [] ){ |s,w|
if s[-1].nil? || s[-1][1] != w
s << [1,w]
else
s[-1][0]+=1
end
s
Container = function( el ){
var
me = {
el:el,
win: $( window )
}
return me
}
Panel = function( el, params ){