Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / UpdateClicksV2.groovy
Created November 3, 2017 19:23
package app
import io.elasticsearch.DocumentIndex
import io.mongodb.DocumentCollection
import org.bson.Document
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesResponse
import org.elasticsearch.client.Client
import org.elasticsearch.cluster.metadata.AliasMetaData
import org.elasticsearch.common.collect.ImmutableOpenMap
anonymous
anonymous / UpdateClicks.groovy
Created November 3, 2017 18:09
package app
import io.elasticsearch.DocumentIndex
import io.mongodb.DocumentCollection
import org.bson.Document
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesResponse
import org.elasticsearch.client.Client
import org.elasticsearch.cluster.metadata.AliasMetaData
import org.elasticsearch.common.collect.ImmutableOpenMap
@AlejandroSilva
AlejandroSilva / gist:86e1ed88c1ce7b4fbb202d9c3178a980
Last active September 18, 2017 07:58
nginx 1.12.1 with pagespeed module loaded dinamically
## INSTALL NGINX
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
## ADD PAGESPEED DINAMICALLY
(from https://github.com/itbdw/nginx_pagespeed_dynamic_module)
cd /etc/nginx
sudo wget https://github.com/itbdw/nginx_pagespeed_dynamic_module/blob/master/nginx_versions/1.12.1/ngx_pagespeed.so?raw=true
sudo mv ngx_pagespeed.so?raw=true ngx_pagespeed.so
@plentz
plentz / nginx.conf
Last active March 28, 2025 17:48
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048