Skip to content

Instantly share code, notes, and snippets.

@bzkdjc
bzkdjc / adb-dns.bat
Created June 24, 2022 05:19 — forked from sharunkumar/adb-dns.bat
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@bzkdjc
bzkdjc / comodo-ssl.md
Created December 9, 2021 21:25 — forked from gustavohenrique/comodo-ssl.md
Configure comodo SSL

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 July 28, 2021 17:51 — forked from auggernaut/couch.js
Creating a per-user Database in CouchDB with nano.
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 February 12, 2021 09:54 — forked from iPaulPro/include_list_viewpager.xml
CollapsingToolbarLayout with TabLayout
<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"