Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kantharia's full-sized avatar
😎
Enjoying Work

Chetan Kantharia kantharia

😎
Enjoying Work
View GitHub Profile
@kantharia
kantharia / themes.json
Created April 17, 2021 05:15
themes.json
[
{
"theme_id": "theme11",
"title": "The Chaotic Kitchen",
"description": "Lorem ipsum...",
"images": [
"assets/theme-images/theme10-1.png",
"assets/theme-images/theme10-2.png",
"assets/theme-images/theme10-3.png",
"assets/theme-images/theme10-4.png",
@kantharia
kantharia / bandwidth.js
Created June 15, 2018 07:45 — forked from mekwall/bandwidth.js
How to measure bandwidth of a server in Node.js (and some other statistics)
const net = require("net");
var server = net.createServer(function (c) {
var oldWrite = c.write;
c.write = function(d) {
if (!Buffer.isBuffer(d)) {
d = new Buffer(d);
}
oldWrite.call(this, d);
server.bytesSent += d.length;
@kantharia
kantharia / letsencrypt_2017.md
Created November 9, 2017 04:27 — forked from cecilemuller/letsencrypt_2020.md
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 main modes to run the Let's Encrypt client (called Certbot):

  • 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).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@kantharia
kantharia / ..nodejs-development-container.md
Created August 9, 2017 14:59 — forked from danfromisrael/..nodejs-development-container.md
Docker container only for development (node.js)

When running develop.sh it will build a node development container in interactive mode (bash) your code folder is shared as a volume into the container workdir meaning you can edit the files in your favorite IDE/Code editor without the need to restart it.

@kantharia
kantharia / LetsEncrypt.md
Created July 26, 2017 03:10 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt