Skip to content

Instantly share code, notes, and snippets.

View debdutdeb's full-sized avatar
🩸

Debdut Chakraborty debdutdeb

🩸
View GitHub Profile
@debdutdeb
debdutdeb / privacy.md
Created August 9, 2022 12:44
TOS and Privacy statements for rocket.chat publisher profile

These apps do not collect any personal information, named or anonymous.

  • discuss
  • Slow Mode
import {
IRead,
IModify,
IHttp,
IPersistence,
} from "@rocket.chat/apps-engine/definition/accessors";
import {
ISlashCommand,
SlashCommandContext,
} from "@rocket.chat/apps-engine/definition/slashcommands";
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
@debdutdeb
debdutdeb / safe_require_nvim.lua
Created October 25, 2022 15:45 — forked from beauwilliams/safe_require_nvim.lua
A simple function to safely require packages. Avoids vim crashing when packages not installed
-- @USAGE:
-- local foo = safe_require('foo')
-- if not foo then return end
_G.safe_require = function(module_name)
local package_exists, module = pcall(require, module_name)
if not package_exists then
vim.defer_fn(function()
vim.schedule(function()
vim.notify('Could not load module: ' .. module_name, 'error', { title = 'Module Not Found' })
end)
@debdutdeb
debdutdeb / compose.yaml
Last active October 27, 2024 21:25
`docker compose up -d` then head over to http://ip:3000
volumes:
mongodb_data: { driver: local }
services:
rocketchat:
image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
restart: always
environment:
MONGO_URL: "${MONGO_URL:-\
mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
@debdutdeb
debdutdeb / clang-format.el
Created July 8, 2023 21:09
clang-format emacs package code from llvm mirror
;; https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/clang-format.el
;;; clang-format.el --- Format code using clang-format -*- lexical-binding: t; -*-
;; Keywords: tools, c
;; Preserving the following comment, but currently using master branch of emacs, thus cl-lib no longer required - contd.
;; from package description "Forward cl-lib compatibility library for Emacs<24."
;; -- Package-Requires: ((cl-lib "0.3")) --
;; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@debdutdeb
debdutdeb / main.go
Last active July 10, 2023 14:04
go max concurrent example
//https://goplay.tools/snippet/gYQ3zCEsjUV
package main
import (
"fmt"
"time"
)
func main() {
batch := 5
@debdutdeb
debdutdeb / README.md
Last active July 11, 2023 17:14
Prepare archive for airgapped installation

use bash <script_name> [tag]

example: bash prepare_rocketchat_archive.sh 6.2.9

import {
IAppAccessors,
IConfigurationExtend,
IEnvironmentRead,
IHttp,
ILogger,
IModify,
IPersistence,
IRead,
} from '@rocket.chat/apps-engine/definition/accessors';
@debdutdeb
debdutdeb / uploadapp.ts
Created July 20, 2023 18:58
example app for uploading files
import {
IAppAccessors,
IConfigurationExtend,
IEnvironmentRead,
IHttp,
ILogger,
IModify,
IPersistence,
IRead,
} from '@rocket.chat/apps-engine/definition/accessors';