Skip to content

Instantly share code, notes, and snippets.

View arunsah's full-sized avatar

Arun arunsah

  • India
View GitHub Profile
@arunsah
arunsah / MathBlock.css
Created April 17, 2021 14:57 — forked from BrianHung/MathBlock.css
MathBlock NodeView for TipTap
.ProseMirror .MathBlock pre {
background: var(--default-back);
color: rgb(var(--default-font));
font-size: 0.8em;
display: flex;
padding: 1em;
}
.ProseMirror .MathBlock {
display: flex;
@arunsah
arunsah / Math.css
Created April 17, 2021 13:54 — forked from BrianHung/Math.css
Math NodeView for TipTap
.ProseMirror .Math {
display: contents;
}
.ProseMirror .Math .katex-editor {
display: inline;
}
.ProseMirror .Math .katex-render .katex {
font-size: 1em;
@arunsah
arunsah / indexedDB.js
Created October 28, 2020 09:27 — forked from underground/indexedDB.js
Very simple indexed DB wrapper class for javascript
export default class IndexedDB {
constructor(dbName, dbVersion, stores) {
this.db;
this.dbName = dbName;
this.dbVersion = dbVersion;
this.stores = stores;
}
openDB(callback=(()=>{})) {
if (!window.indexedDB) {
@arunsah
arunsah / .block
Created October 28, 2020 02:02 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-collapsible-tree
@arunsah
arunsah / walkers-algorithm-with-canvas.js.html
Created October 27, 2020 01:00 — forked from ognis1205/walkers-algorithm-with-canvas.js.html
Javascript Implementation of Walkers Algorithm
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">
<title>TEST</title>
</head>
<body>
<div id="example-input">
<div>
<div>
<ul>
@arunsah
arunsah / rabbitmq-cluster.md
Created July 14, 2018 10:14 — forked from pobsuwan/rabbitmq-cluster.md
How to config rabbitmq server cluster [3 nodes]

How to config rabbitmq server cluster [3 nodes]

Do after install SLGInstallers

Edit /etc/hosts

vi /etc/hosts
192.168.10.157  rabbitmq-1
192.168.10.159  rabbitmq-2
192.168.10.161  rabbitmq-3
@arunsah
arunsah / setup-rabbitmq-cluster.sh
Created July 14, 2018 05:08 — forked from adilbaig/setup-rabbitmq-cluster.sh
A complete bash script to setup a RabbitMQ cluster from scratch. Takes user-defined servers at run time.
#!/bin/bash
set -e
# This script is part of my blog post :
# http://thoughtsimproved.wordpress.com/2015/01/03/tech-recipe-setup-a-rabbitmq-cluster-on-ubuntu/
# It sets up a RabbitMQ cluster by connecting to user-provided master and slave servers
# and ringing them up to a cluster on the fly.
# RabbitMQ Clustering is described in detail here :
@arunsah
arunsah / haproxy.cfg
Created July 8, 2018 04:05 — forked from nakato/haproxy.cfg
A quickly throw together haproxy config for RabbitMQ
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
tune.bufsize 128000