Skip to content

Instantly share code, notes, and snippets.

View oonid's full-sized avatar
🤓
learning.

oon arfiandwi oonid

🤓
learning.
View GitHub Profile
@naile
naile / search.js
Created February 3, 2019 20:55
search.js
//vanilla js version of https://gist.github.com/sebz/efddfc8fdcb6b480f567
var lunrIndex,
$results,
pagesIndex;
// Initialize lunrjs using our generated index file
function initLunr() {
var request = new XMLHttpRequest();
request.open('GET', 'js/lunr/index.json', true);
@xrstf
xrstf / letsencrypt.md
Last active April 18, 2023 05:01
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@kravietz
kravietz / sitemap-split.py
Created February 19, 2015 12:43
XML sitemap split into 50k chunks
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from gzip import GzipFile
import gzip
import sys
__author__ = 'Paweł Krawczyk'