Skip to content

Instantly share code, notes, and snippets.

View manikantag's full-sized avatar
😀

Manikanta Gade manikantag

😀
View GitHub Profile
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@manikantag
manikantag / better-nodejs-require-paths.md
Created October 20, 2016 15:38 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@manikantag
manikantag / gist:fe4857920cd9ba299bc478f229e8dd7d
Created March 6, 2018 05:51 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@manikantag
manikantag / fastdom-async.html
Last active February 15, 2019 06:12
fastdom perf analysis with Callbackss, Promise, async/await;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Fastdom promises + async/await test</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div id="container">
@manikantag
manikantag / getx-async-assingment-issue.dart
Last active September 24, 2021 17:19
Flutter Getx observable assignment in async issue
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(GetMaterialApp.router(
title: 'Test',
initialBinding: BindingsBuilder.put(() => AuthService(), permanent: true),
getPages: [
@manikantag
manikantag / duplicate-tab-check.js
Created September 27, 2023 14:36
duplicate-tab-check.js
const tabCheckBroadcast = new BroadcastChannel("TAB_CHECK");
tabCheckBroadcast.postMessage("FIRST_TAB");
tabCheckBroadcast.onmessage = (event) => {
if (event.data === "FIRST_TAB") {
tabCheckBroadcast.postMessage("FIRST_TAB_OPENED");
}
if (event.data === `FIRST_TAB_OPENED`) {
alert("You are not supposed to duplicate the tab");
//disableApp();
}