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
@count_overlay = (color, overlay) -> | |
# First part: If Lower Layer Value > 127.5, then do the following - | |
# Value Unit = (255-Lower Layer Value)/127.5 | |
# Min Value = Lower Layer Value - (255-Lower Layer Value) | |
# Overlay = (Upper Layer Value * Value Unit) + Min Value | |
# Second part: If Lower Layer Value < 127.5, then do the following - | |
# Value Unit=Lower Layer Value/127.5 | |
# Overlay = Upper Layer Value * Value Unit | |
color = parseInt(color) | |
overlay = parseInt(overlay) |
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
#For some reason, this took forever to figure out... | |
passenger start -a 127.0.0.1 -p 3000 -d -e production |
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
import hashlib | |
import re | |
from datetime import * | |
from django.db import connection | |
from django.conf import settings | |
from django.core import serializers | |
import simplejson as json | |
def date_conv(obj): | |
import calendar, datetime |
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
"40.71399899774998,-73.96226638749108|40.71444900225002,-73.9606376125089" | |
coords = [40.714224,-73.961452] | |
lng_corr = 0.05 / (Math.cos(coords[1] * Math.PI / 180) * 111.11) / 2 | |
lat_corr = 0.05 / 111.11 / 2 | |
bounds = [[coords[0] - lat_corr,coords[1] - lng_corr],[coords[0] + lat_corr, coords[1] + lng_corr]] | |
bounds_string = bounds[0].join(',') + '|' + bounds[1].join(','); |
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 query_to_object = function(url) { | |
var param, params, query, result, _i, _len; | |
if (url == null) { | |
url = 'http://moto1.englearn.org/index.php?route=product/product==&path=59&product_id=50'; | |
} | |
query = url.split('?')[1]; | |
result = {}; | |
if (query != null) { | |
params = query.split('&'); | |
for (_i = 0, _len = params.length; _i < _len; _i++) { |
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 object_to_query = function(object) { | |
var key, result, value; | |
if (object == null) { | |
object = { | |
"route": "product/product", | |
"path": "59", | |
"product_id": "50" | |
}; | |
} | |
result = window.location.href + '?'; |
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
[[!FormIt? | |
&hooks=`spam,email,redirect` | |
&emailTpl=`MyEmailChunk` | |
&emailTo=`pman89@yandex.ru` | |
&redirectTo=`1` | |
&validate=`name:required, | |
mail:email:required, | |
phone:required, | |
text:required:stripTags` | |
]] |
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
[[!FormIt? &hooks=`spam,email,redirect` &emailTpl=`MyEmailChunk` &emailTo=`atlant.vbg@gmail.com` &redirectTo=`1` &validate=`name:required, mail:email:required, phone:required, text:required:stripTags` ]] | |
<div class="section_header contacts"> | |
<h3>Контакты</h3> | |
</div> | |
<p><strong>Адрес:</strong><br /> Лен обл. г. Выборг, Промзона Лазаревка<br /> Тел: +7 (921) 97-100-47,+7 (921) 76-766-47 <br /> e-mail: atlant.vbg@gmail.com </p> | |
<div class="right_float_cnt"> | |
<strong>Режим работы:</strong><br /> Понедельник – пятница 08:00 - 19:00 <br /> Суббота 09:00 – 16:00 <br /> Воскресенье - выходной | |
</div> | |
<script charset="utf-8" type="text/javascript" src="http://api-maps.yandex.ru/services/constructor/1.0/js/?sid=nNWTtGSA3PgMOYWjJOzblbs6ftv3lFu2&width=920&height=350"></script> | |
<p> </p> |
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
/* | |
* L.TileLayer is used for standard xyz-numbered tile layers. | |
*/ | |
L.Google = L.Class.extend({ | |
includes: L.Mixin.Events, | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, |
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
module.exports = (grunt) -> | |
# Project configuration. | |
grunt.initConfig | |
coffee: | |
options: | |
sourceMap: false | |
app: | |
expand: true | |
cwd: 'public/js/coffee/' |
OlderNewer