Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require "./lib/conf"
require "./lib/ingeo_func"
(ARGV.size-1).times do|i|
if ARGV[i]=="-L" || ARGV[i]=="--layer"
@layer_id = ARGV[i+1]
end
<!DOCTYPE html>
<html>
<head>
<title>bench</title>
<meta charset="UTF-8">
<script src='redtea.js' type='text/javascript'></script>
<script src='underscore.js' type='text/javascript'></script>
<script src='jquery-1.9.0.js' type='text/javascript'></script>
</head>
@Talleyran
Talleyran / all_engine.js
Created November 15, 2012 20:51
js test
var t,
F,F2,F3,F4,
G,G2,G3,G4,
E,E2,E3,E4,
obj,obj2,obj3,obj4,obj5,obj6,obj7,obj8
F = function(){ this.a = 1 }
F.prototype.setA = function(v){ this.a = v }
F2 = function(){ this.a = 1; this.b = 1 }
let t,
F,F2,F3,F4,
G,G2,G3,G4,
E,E2,E3,E4,
obj,obj2,obj3,obj4,obj5,obj6,obj7,obj8
F = function(){ this.a = 1 }
F.prototype.setA = function(v){ this.a = v }
F2 = function(){ this.a = 1; this.b = 1 }
@Talleyran
Talleyran / lorquotes
Created October 30, 2012 05:41
Lorquotes UserScript
// ==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 = {}
@Talleyran
Talleyran / Coffeescript ctags
Created April 22, 2012 02:56 — forked from mads-hartmann/Coffeescript ctags
ctags definitions for Coffeescript. Very basic for now. "> ctags -e -R source_folder" and then M-. to jump to the definition of any function or variable (if you're using emacs)
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^[ \t]*class ([a-zA-Z_$][0-9a-zA-Z_$]*).*$/\1/c,class/
--regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*[:=].*[=-]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*=[^->\n]*$/\1/v,variable/
@Talleyran
Talleyran / gist:2043677
Created March 15, 2012 11:05
v3 hybrid hack
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)
@Talleyran
Talleyran / gist:1985624
Created March 6, 2012 10:39
Генерация разрешений и масштабов для слоя
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))
}
# 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"
# 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