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
var DOMRender = function() { | |
var self = this; | |
this.attrs = {}; | |
this.attrs.node = false; | |
this.attrs.items = false; | |
this.render = function(items, node) { | |
var cache = { |
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 loadFromGrunt(items) { | |
var html = ''; | |
for (var i in items) { | |
html += '<script src="/' + items[i] + '"><\/script>'; | |
} | |
document.write(html); | |
} | |
loadFromGrunt([]); |
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
var text = ' Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; | |
var _ = require('underscore'); | |
var div = document.getElementById('TEST'); | |
var count = 10000; | |
var parentsCount = 100; | |
var parentIds = _.range(0, parentsCount, 1); | |
var items = {}; | |
while (count > 0) { |
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
#!/bin/bash | |
NGINX_CONFIGS_DIR=/etc/nginx/sites-available/ | |
NGINX_CONFIGS=/etc/nginx/sites-available/* | |
NGINX_CONFIGS_ENABLED_DIR=/etc/nginx/sites-enabled/ | |
NGINX_CONFIGS_ENABLED=/etc/nginx/sites-enabled/* | |
if [ -d "$NGINX_CONFIGS_ENABLED" ]; then | |
rm -r $NGINX_CONFIGS_ENABLED; |
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
server { | |
listen 80; | |
listen 443 ssl; | |
ssl_certificate /etc/nginx/ssl/server.crt; | |
ssl_certificate_key /etc/nginx/ssl/server.key; | |
set $host_path "/var/lib/jenkins/jobs/{PROJECT_NAME}/workspace/web/{SERVER}"; | |
access_log /var/lib/jenkins/jobs/{PROJECT_NAME}/workspace/runtime/logs/access.log; |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'appdir/default/module', | |
'modules/galleryObject/models/module', | |
'modules/galleryObject/collections/gallery', |
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
import _ from 'underscore'; | |
import Collection from 'core/Collection'; | |
import MediaModel from 'storage/models/Media'; | |
class MediaCollection extends Collection { | |
constructor(attr, options) { | |
options.model = MediaModel; | |
super(attr, options); | |
this.itemsOrder = []; // порядок медиафайлов в коллекции |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone' | |
], function ($, | |
_, | |
Backbone) { | |
/** | |
* options |
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 ($) { | |
var requestAnimationFrame = window.requestAnimationFrame | |
|| window.mozRequestAnimationFrame | |
|| window.webkitRequestAnimationFrame | |
|| window.msRequestAnimationFrame; | |
window.requestAnimationFrame = requestAnimationFrame; | |
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
/** | |
* 1. какие типы данных знает (во всеъ языках программировани какие знает) | |
* */ | |
/** | |
* 2. Какие типы запросов существуют, какие между ними отличия (GET, POST, ...?) | |
* */ | |
/** | |
* |