Skip to content

Instantly share code, notes, and snippets.

View debdutdeb's full-sized avatar
🩸

Debdut Chakraborty debdutdeb

🩸
View GitHub Profile
@debdutdeb
debdutdeb / main.go
Created March 3, 2024 18:48
Code for different number theory algorithms in golang ofc
package main
import "fmt"
func gcd(a, b int) int {
var fun func(int, int) int
fun = func(l, h int) int {
r := h % l
if r == 0 {
@debdutdeb
debdutdeb / md.md
Created November 29, 2023 08:37
Testing github's markdown implementation
@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';
import {
IAppAccessors,
IConfigurationExtend,
IEnvironmentRead,
IHttp,
ILogger,
IModify,
IPersistence,
IRead,
} from '@rocket.chat/apps-engine/definition/accessors';
@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

@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 / 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 / compose.yaml
Last active April 17, 2024 20:49
`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 / 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)
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>