This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FieldsObject | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
@@field_types = [ | |
:array, | |
:big_decimal, | |
:boolean, | |
:date, | |
:date_time, | |
:float, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Personalized! | |
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T} | |
DALLAS_CURRENT_TIME_="%{$fg[white]%}%{$fg[yellow]%}%D %T%{$fg[white]%} %{$reset_color%}" | |
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7] | |
DALLAS_CURRENT_RUBY_="%{$fg[white]%}%{$fg[magenta]%}\$(rvm-prompt i v)%{$fg[white]%} %{$reset_color%}" | |
# Grab the current machine name: muscato | |
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}" | |
# Grab the current filepath, use shortcuts: ~/Desktop | |
# Append the current git branch, if in a git repository: ~aw@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set to the name theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
export ZSH_THEME="special_dallas" | |
# Set to this to use case-sensitive completion | |
# export CASE_SENSITIVE="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var maxResolution = 156543.03390625, | |
resolutions = [], | |
scales = [] | |
units = 'm' | |
for( var i=0; i<20; i++){ | |
var res = maxResolution/Math.pow(2,i) | |
resolutions.push(res) | |
scales.push(OpenLayers.Util.getScaleFromResolution(res,units)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = app.mapPanel.map.layers[4].mapObject, | |
zoom = obj.getZoom() | |
google.maps.event.addListenerOnce(obj, 'idle', function(){if(zoom != obj.getZoom())obj.setZoom(zoom)}) | |
obj.setZoom(zoom + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name lorquotes | |
// @namespace lor | |
// @include http://www.linux.org.ru/forum/*/* | |
// @exclude http://www.linux.org.ru/forum/*/ | |
// @include http://www.linux.org.ru/news/*/* | |
// @exclude http://www.linux.org.ru/news/*/ | |
// @version 1 | |
// ==/UserScript== | |
let quotesStore = {} |