- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
This file contains hidden or 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
function guid(){ | |
var S4 = function () { | |
return (((1+Math.random())*0x10000)|0).toString(16).substring(1); | |
}; | |
return (S4() + S4() + "-" + S4() + "-4" + S4().substr(0,3) + "-" + S4() + "-" + S4() + S4() + S4()).toLowerCase(); | |
} |
This file contains hidden or 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
function returnJSON($stdObject) { | |
$jsonBefore = json_encode($stdObject, JSON_UNESCAPED_UNICODE); | |
$jsonAfter = preg_replace("/\\\\\//", "/", $jsonBefore); | |
header("Content-Type: application/json; charset=utf-8;"); | |
echo $jsonAfter; | |
} |
This file contains hidden or 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
$date1 = new DateTime('03.01.2015'); | |
$date2 = new DateTime('12.01.2015'); | |
$a = date_diff($date1, $date2); | |
$str = $a->format('%d дней'); |
This file contains hidden or 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
const path = require('path'); | |
const NODE_ENV = process.env.NODE_ENV || 'development'; | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const extractSass = new ExtractTextPlugin("style.css"); | |
const nodeModulesPath = path.resolve(__dirname, '', 'node_modules'); | |
const assetsPath = path.resolve(__dirname, '', 'templates/src'); | |
const buildPath = path.resolve(__dirname, '', 'templates/.default'); | |
module.exports = { |
This file contains hidden or 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
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -q -f dangling=true) |
This file contains hidden or 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
# запуск docker-compose -f ../docker-compose.yml up --build | |
# запускается из папок dev и prod с разными .env, в которых настроены порты, пути, пароли и т.п. | |
version: '3.3' | |
services: | |
nginx: | |
container_name: ${TITLE}_nginx | |
build: | |
context: ./../nginx | |
ports: |
This file contains hidden or 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
<?php | |
/** | |
* Ресайзер изображений. Ибо CFile::ResizeImageGet не умеет увеличивать | |
* @param mixed $imageFile ID файла, массив, либо путь | |
* @param array $arSize размеры результата | |
* @return array | |
*/ | |
function ImageResize($image, $arSize = array(100, 100), $crop = true) { | |
if (is_array($image) && $image["SRC"] != "") { | |
$imageFile = $image["SRC"]; |
This file contains hidden or 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
rsync -avn --no-o \ | |
--groupmap=deployer:www-data \ | |
--exclude=bitrix \ | |
--exclude=upload \ | |
--exclude=sites/main \ | |
/var/www/sitefolder/ \ | |
deployer@10.62.7.22:/var/www/sitefolder/ |
OlderNewer