Skip to content

Instantly share code, notes, and snippets.

rlam3 /
Created Apr 3, 2017 — forked from cecilemuller/
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

rlam3 / nginx.conf
Created Mar 31, 2017 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View .swift
let endpoint = Endpoint<ApiRouter>(
URL: target.baseURL.URLByAppendingPathComponent(target.path).absoluteString,
sampleResponseClosure: EndpointSampleResponse.NetworkResponse(200, NSData()), /// ERROR HERE .SUCCESS does not exists
method: target.method,
parameters: target.parameters,
parameterEncoding: self.parameterEncoding(target),
httpHeaderFields: [:]
rlam3 /
Created Apr 12, 2016 — forked from ricardo-rossi/
Installing ElasticSearch on Ubuntu 14.04
### ./ 1.7 will install Elasticsearch 1.7
### ./ will fail because no version was specified (exit code 1)
### CLI options Contributed by @janpieper
### Check for latest version of ElasticSearch
from datetime import datetime
from elasticsearch_dsl import (
def _suffix():
View gist:c4f2b80cc5d768c1a1e8
import os
fullpath = os.path.join(os.sys.path[0],'path/to/file/or/folder'
# size of folder or file
# reminder: folder size does not include content within folder
You can’t perform that action at this time.