Skip to content

Instantly share code, notes, and snippets.

View subhadipghs's full-sized avatar
👨‍💻

Subhadip Ghosh subhadipghs

👨‍💻
View GitHub Profile
@GSuaki
GSuaki / Bibliografia: Concurrency Patterns for High Performance Applications
Last active August 3, 2024 19:05
Bibliografia da Talk: Concurrency Patterns for High Performance Applications
[https://www.educative.io/courses/operating-systems-virtualization-concurrency-persistence](https://www.educative.io/courses/operating-systems-virtualization-concurrency-persistence/BnLk0BVXx2X)
[https://youtu.be/DlEa8kd7n3Q](https://youtu.be/DlEa8kd7n3Q)
[https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/](https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/)
[https://stackoverflow.com/questions/22356257/who-runs-the-scheduler-in-operating-systems-when-cpu-is-given-to-user-processes](https://stackoverflow.com/questions/22356257/who-runs-the-scheduler-in-operating-systems-when-cpu-is-given-to-user-processes)
[https://tldp.org/LDP/tlk/dd/interrupts.html](https://tldp.org/LDP/tlk/dd/interrupts.html)
@robertrypula
robertrypula / web-socket-server.js
Created February 11, 2021 20:50
WebSocket - binary broadcast example (pure NodeJs implementation without any dependency)
// Copyright (c) 2019-2021 Robert Rypuła - https://github.com/robertrypula
/*
+--------------------------------------------------+
| Binary broadcast WebSocket server in pure NodeJs |
+--------------------------------------------------+
Based on great article created by Srushtika Neelakantam:
https://medium.com/hackernoon/implementing-a-websocket-server-with-node-js-d9b78ec5ffa8
import React, { useState, useEffect, createContext, useContext, ReactNode } from 'react'
import Amplify, { Auth, Hub } from 'aws-amplify'
import { CognitoUser } from '@aws-amplify/auth'
import { CognitoUserSession } from 'amazon-cognito-identity-js'
import { HubCallback } from '@aws-amplify/core/lib/Hub'
import IUser from '../../types/IUser'
interface IAuthContext {
user: IUser | null
login(username: string, password: string): Promise<CognitoUser>
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@reu
reu / proxy.js
Created March 22, 2019 15:01
Simple HTTP proxy
const http = require("http");
const { PORT, PROXY_HOST, PROXY_PORT } = process.env;
http
.createServer((req, res) => {
const proxyRequest = http
.request({
hostname: PROXY_HOST,
port: PROXY_PORT || 80,
@YumaInaura
YumaInaura / 00_README.md
Last active February 9, 2025 09:35
Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

I was so confused to understand behaviior of Golang channels, buffer, blocking, deadlocking and groutines.

I read Go by Example topics.

@dmsul
dmsul / vim_crash_course.md
Last active March 3, 2025 18:49
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

@soulmachine
soulmachine / jwt-expiration.md
Last active January 9, 2025 12:03
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC:

@MWins
MWins / project-ideas01.md
Last active March 10, 2025 10:11
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@markreid
markreid / gitflowrebasing.md
Created January 17, 2017 04:30
git flow with rebasing