I was so confused to understand behaviior of Golang channels, buffer, blocking, deadlocking and groutines.
I read Go by Example topics.
[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) |
// 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' |
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, |
NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.
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.
First of all, please note that token expiration and revoking are two different things.
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:
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.