Skip to content

Instantly share code, notes, and snippets.

View rajibchy's full-sized avatar
:bowtie:
I may be slow to respond.

Rajib Chowdhury rajibchy

:bowtie:
I may be slow to respond.
View GitHub Profile
@rajibchy
rajibchy / SyncQueue.cs
Last active July 30, 2025 18:00
A high-performance, thread-safe message queue using `System.Threading.Channels.Channel`
// Copyright FSys Tech Limited [FSys]. All rights reserved.
//
// This software owned by FSys Tech Limited [FSys] and is protected by copyright law
// and international copyright treaties.
//
// Access to and use of the software is governed by the terms of the applicable FSys Software
// Services Agreement (the Agreement) and Customer end user license agreements granting
// a non-assignable, non-transferable and non-exclusive license to use the software
// for it's own data processing purposes under the terms defined in the Agreement.
//
@rajibchy
rajibchy / ArrayStack.cs
Last active February 17, 2026 23:24
Pop, Shift and Push off array in C# equivalent of `Javascript` `Array`
// Copyright (c) 2022 Safe Online World Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
@rajibchy
rajibchy / shared_queue.hpp
Last active October 1, 2022 06:48
🚀 Multithreading shared queue with C++ 💯 🌹
// Copyright (c) 2022 Safe Online World Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
@rajibchy
rajibchy / cfile-stream.cpp
Created August 24, 2022 05:01
🚀 Memory and desk file cache mechanism with C++ 💯 🌹
// Copyright (c) 2022 Safe Online World Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
@rajibchy
rajibchy / utility.cpp
Last active August 19, 2022 07:40
C++ Socket Utility 💯 🌹
/**
* Copyright (c) 2022, https://github.com/rajibchy All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
// 11:29 AM 11/28/2021
// by Rajib Chy
#ifdef _MSC_VER
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <Winsock2.h>
@rajibchy
rajibchy / notification.d.ts
Last active August 19, 2022 07:40
🌹 Bubble Notification (Javascript) 💯
declare interface WebNotificationConfig {
icon?: string; // to be implemented
caption?: string;
content: any;
shadow?: boolean;
width?: string;
height?: string;
style?: boolean | NodeJS.Dict<any>; // {background: '', color: ''}
position?: string; //right, left
timeout?: number;
@rajibchy
rajibchy / AsyncSignal.cs
Last active December 26, 2023 05:57
🚀 Multithreading Asynchronous signal mechanism 💯
/*
* Copyright FSys Tech Limited [FSys]. All rights reserved.
*
* This software owned by FSys Tech Limited [FSys] and is protected by copyright law
* and international copyright treaties.
*
* Access to and use of the software is governed by the terms of the applicable FSys Software
* Services Agreement (the Agreement) and Customer end user license agreements granting
* a non-assignable, non-transferable and non-exclusive license to use the software
* for it's own data processing purposes under the terms defined in the Agreement.
@rajibchy
rajibchy / stackDataSource.js
Last active August 19, 2022 07:40
Javascript Stack Data Source for React-Native FlatList
// @ts-check
// 10:30 AM 7/13/2021
// by rajib chy
export default class DataSource {
/** return copy of data array */
get data() {
return this._useFilter ? [...this._shadow] : [...this._data];
}
get isEndReached() {
return this._fromIndex >= this._length
@rajibchy
rajibchy / ThreadSafe.cs
Created June 5, 2021 16:10
Thread-safe Utility
/// <![CDATA[copyright]]>
/// Copyright (c) 2018, Sow ( https://safeonline.world, https://www.facebook.com/safeonlineworld). (https://github.com/RKTUXYN) All rights reserved.
/// Copyrights licensed under the New BSD License.
/// See the accompanying LICENSE file for terms.
/// <![CDATA[copyright]]>
/// <![CDATA[Author]]>
/// By Rajib Chy
/// On 6/3/2021 10:43:14 PM
/// <![CDATA[Author]]>
using System;
@rajibchy
rajibchy / ProcessManager.cs
Created June 5, 2021 16:07
Thread-safe Concurrent Process Manager
/// <![CDATA[copyright]]>
/// Copyright (c) 2018, Sow ( https://safeonline.world, https://www.facebook.com/safeonlineworld). (https://github.com/RKTUXYN) All rights reserved.
/// Copyrights licensed under the New BSD License.
/// See the accompanying LICENSE file for terms.
/// <![CDATA[copyright]]>
/// <![CDATA[Author]]>
/// By Rajib Chy
/// On 5/27/2021 7:56:04 PM
/// <![CDATA[Author]]>
using System;