The following will minify your assets with grunt each time a generation write completes.
- Install Dependencies
function testUrl(){ | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("PIMS"); | |
var data = sheet.getRange(2,5,sheet.getLastRow(),1).getValues(); | |
for (var i = 0; i < data.length; i++){ | |
var responseCode = "-"; | |
if (data[i][0].substring(0,4)=="http"){ | |
try | |
{ | |
var response = UrlFetchApp.fetch(data[i][0]); |
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
// Equal height of the blocks | |
function setEqualHeight(blocks, etalon, correction){ | |
blocks = $(blocks); | |
if ( blocks.length > 1 ) { | |
var tallest = 0; | |
blocks.each(function(){ | |
var height = $(this).outerHeight(true); | |
if (tallest < height) tallest = height; | |
}); | |
if (etalon && tallest < etalon) { |
The following will minify your assets with grunt each time a generation write completes.
(function($) { | |
$(function() { | |
$('#selector').each(function(){ | |
var text = $(this).val(); | |
$(this) | |
.focusin(function(){ | |
$(this).addClass('focus'); | |
if ($(this).val() == text) $(this).val(''); | |
}) | |
.focusout(function(){ |
/* Вешаем событие прокрутки на все якоря (#) на странице */ | |
$('a[href^="#"]').bind('click.smoothscroll', function (e) { | |
e.preventDefault(); | |
var target = this.hash, | |
$target = $(target); | |
$('html, body').stop().animate({ | |
'scrollTop':$target.offset().top | |
}, 900, 'swing', function () { | |
window.location.hash = target; | |
}); |
/* ------------------------------------- | |
cusel version 2.5 | |
last update: 31.10.11 | |
смена обычного селект на стильный | |
autor: Evgen Ryzhkov | |
updates by: | |
- Alexey Choporov | |
- Roman Omelkovitch | |
using libs: |
# Define our Configuration | |
docpadConfig = | |
# Define our own Collections | |
collections: | |
# Posts | |
# Anything outputted to the posts directory can be considered a post | |
# Sort the posts by newest first | |
# And set their layout to `post` automatically if it isn't already set |
Creates URLs like /2012/12/15/merry-xmas
for your blog posts.
Requires momentjs to be installed: npm install --save moment
Node.js is just JavaScript running on the server side. That's it. That's all there is to it.