Большая Тёрка / Мысли /
module.exports = function (grunt) { ... grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-shell-spawn'); ... grunt.registerTask('stopNode', function() { grunt.util.spawn({ cmd: 'killall', args: ['node'], fallback: 0 }, function (error, result, code) {return 0}); }); grunt.registerTask('startNode', ['shell:startNode']); grunt.registerTask('restartNode', ['stopNode','startNode']); ... watch: { options: { livereload: true, nospawn: true }, coffee: { files: ["./*.coffee", 'routes/*.coffee'], tasks: [ "coffee", "restartNode" ] } }, shell: { startNode: { command: ["node ./app.js"], options: { async: true, execOptions: { cwd: './', detached: true } } }, options: { stdout: true, stderr: true, failOnError: false } } ... }); };
extends layout include whcenter block content body div#sticky_footer_body_wrap: div#adjust_width_to_device nav#top-navbar div#top-navbar-brand img#brand-img(src="/public/images/logo.png") div#top-navbar-phone: +fwhcenter("300px") div г. Новосибирск, ул. Большевистская, 109к1 div тел/факс: b (383) 251-01-18 div#sticky_footer: div#adjust_width_to_device div footer content
mixin fwhcenter(inner_width, outer_width) if block if outer_width div.whouter(style="width:#{outer_width};"): div.whmiddle: div.whinner(style="width:#{inner_width};") block else div.whouter(style="width:#{inner_width};"): div.whmiddle: div.whinner(style="width:#{inner_width};") block else
link(rel="stylesheet", type="text/css", href="/public/stylesheets/src/fwvh-centerer-modern.css") | <!--[if lte IE 7]> | <link rel="stylesheet" type="text/css" href="/public/stylesheets/src/fwvh-centerer-compat.css"></link> | <![endif]-->
.whouter { display: table; position: absolute; height: 100%; width: 100%; } .whmiddle { display: table-cell; vertical-align: middle; } .whinner { margin-left: auto; margin-right: auto; }
.whouter { display: inline-block; top: 0; } .whmiddle { display: inline-block; top: 50%; position: relative; } .whinner { display: inline-block; top: -50%; position: relative; }
| <!--[if lt IE 9]> | <script type="text/javascript" src="/public/javascripts/vendor/other/html5shiv.js" ></script> | <script type="text/javascript" src="/public/javascripts/vendor/other/es5shim.js" ></script> | <script type="text/javascript" src="/public/javascripts/vendor/other/respond.min.js" ></script> | <![endif]-->
upstream new.asterelectro.my { server 127.0.0.1:3000; } server { server_name new.asterelectro.my; root /my/sites/asterel3; location ~ ^/(public/) { root /my/sites/asterel3; access_log off; expires max; #try_files $uri @rw_static_fallback; } #location @rw_static_fallback { # rewrite ^(.*)$ /static-fallback$1 last; #} location / { proxy_pass http://new.asterelectro.my/; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header Connection ""; proxy_http_version 1.1; proxy_cache one; proxy_cache_key asterel3$request_uri$scheme; } error_log /var/log/nginx/asterel3.log; access_log /var/log/nginx/asterel3.log; }
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=300; proxy_temp_path /var/tmp; #default_type application/octet-stream; #sendfile on; #keepalive_timeout 65; #gzip on; gzip_comp_level 6; gzip_vary on; gzip_min_length 1000; gzip_proxied any; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript gzip_buffers 16 8k;