Skip to content

Instantly share code, notes, and snippets.

View artemis15's full-sized avatar
Technology Over a Cup of Coffee

Akash Rajput artemis15

Technology Over a Cup of Coffee
View GitHub Profile
@artemis15
artemis15 / n8n-docling-dockerfile
Created August 18, 2025 06:41 — forked from gbdevw/n8n-docling-dockerfile
N8N with Python environment and Docling
FROM debian:bullseye-slim
ENV NODE_VERSION=20 \
N8N_VERSION=1.102.0 \
PYTHON_PACKAGES_PATH=/home/n8n/.local
# 1. Install base dependencies
RUN apt-get update && apt-get install -y \
curl gnupg git python3 python3-pip python3-venv build-essential bash \
&& apt-get clean
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
xml2js = require('xml2js')
},{"xml2js":51}],2:[function(require,module,exports){
'use strict';
var keys = require('object-keys');
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
var toStr = Object.prototype.toString;
@artemis15
artemis15 / prom-client_pm2_cluster.js
Created August 27, 2021 11:48 — forked from yekver/prom-client_pm2_cluster.js
Instead of `cluster` module there is no direct access to the master process in `pm2`. To return metrics for the whole cluster you can do IPC calls from the active instance to the rest of them and wait while all their locally collected metrics will be sent. Finally you have to aggregate all received metrics.
const prom = require('prom-client');
const pm2 = require('pm2');
let pm2Bus;
const REQ_TOPIC = 'get_prom_register';
function pm2exec(cmd, ...args) {
return new Promise((resolve, reject) => {
pm2[cmd](...args, (err, resp) => (err ? reject(err) : resolve(resp)));
@artemis15
artemis15 / prom-client_pm2_cluster.js
Created August 27, 2021 11:48 — forked from yekver/prom-client_pm2_cluster.js
Instead of `cluster` module there is no direct access to the master process in `pm2`. To return metrics for the whole cluster you can do IPC calls from the active instance to the rest of them and wait while all their locally collected metrics will be sent. Finally you have to aggregate all received metrics.
const prom = require('prom-client');
const pm2 = require('pm2');
let pm2Bus;
const REQ_TOPIC = 'get_prom_register';
function pm2exec(cmd, ...args) {
return new Promise((resolve, reject) => {
pm2[cmd](...args, (err, resp) => (err ? reject(err) : resolve(resp)));
@artemis15
artemis15 / System Design.md
Created September 24, 2020 06:58 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?