Skip to content

Instantly share code, notes, and snippets.

@bzkdjc
bzkdjc / comodo-ssl.md
Created Dec 9, 2021 — forked from gustavohenrique/comodo-ssl.md
Configure comodo SSL
View comodo-ssl.md

Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You'll be asked for the content of the CSR file when ordering the certificate.

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr

This gives you two files:

  • example_com.key -- your Private key. You'll need this later to configure ngxinx.
@bzkdjc
bzkdjc / couch.js
Last active Jul 28, 2021 — forked from auggernaut/couch.js
Creating a per-user Database in CouchDB with nano.
View couch.js
exports.findOrCreateDB = function (config, creds, cb) {
let nano = require('nano')(`http://${config.couch_admin}:${config.couch_password}@${config.couch_host}:${config.couch_port}`),
users = nano.use('_users'),
userDB = nano.use(creds.username),
log = console.log.bind(console, "[DEBUG]"),
user = {
_id : "org.couchdb.user:" + creds.username,
name : creds.username,
@bzkdjc
bzkdjc / include_list_viewpager.xml
Last active Feb 12, 2021 — forked from iPaulPro/include_list_viewpager.xml
CollapsingToolbarLayout with TabLayout
View include_list_viewpager.xml
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"