Skip to content

Instantly share code, notes, and snippets.

View vladyslav2's full-sized avatar
🎯
Focusing

Vladyslav Tarasenko vladyslav2

🎯
Focusing
View GitHub Profile
"use strict";
const inherits = require('util').inherits,
db = require('db'),
q = require("q");
function Jobs()
{
// Пример с callbackом и типа без лапши
@vladyslav2
vladyslav2 / nginx_gzip_conf
Created May 9, 2016 19:22
nginx gzip configuration
http {
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 8;
gzip_proxied any;
gzip_min_length 1000;
gzip_types
# text/html is always compressed by HttpGzipModule
text/css
@vladyslav2
vladyslav2 / nginx_microcache
Created May 9, 2016 19:23
nginx microcache configution
proxy_cache_path /tmp/cache keys_zone=cache:10m levels=1:2 inactive=600s max_size=100m;
server {
proxy_cache cache;
proxy_cache_valid 200 1s;
...
}
@vladyslav2
vladyslav2 / nginx_expire_max
Created May 9, 2016 19:24
nginx static and media files configutaion
location /static {
expires 1d;
access_log off;
log_not_found off;
break;
}
location /media {
expires max;
access_log off;
{
"name": "Name",
"description": "Description",
"fields": {
"custom_fields": {
"type": "nested",
"many": false,
"schema": {
"age": {
"type": "integer",