Skip to content

Instantly share code, notes, and snippets.

View serhiiminin's full-sized avatar
🏠
Working from home

Serhii Minin serhiiminin

🏠
Working from home
View GitHub Profile
@serhiiminin
serhiiminin / ntlm.js
Created October 4, 2021 13:06 — forked from JoeStanton/ntlm.js
NTLM Authentication with node-fetch
/* eslint-disable no-console */
const https = require('https');
const fetch = require('node-fetch');
const ntlm = require('httpntlm').ntlm;
const keepAlive = new https.Agent({ keepAlive: true });
const handleErrors = (response) => {
if (!response.ok) {
@serhiiminin
serhiiminin / vscode.md
Last active May 21, 2020 16:24
my shortcuts for vs code
Shortcut Description
⌘K ⌘S Keyboard Shortcuts
⇧⌘P, F1 Show Command Palette
⌘P Quick Open, Go to File…
⌥↓ / ⌥↑ Move line down/up
⇧⌥↓ / ⇧⌥↑ Copy line down/up
Multi-cursor and selection
⌥ + click Insert cursor
⌥⌘↑ Insert cursor above

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor

Basic types

String

const str: string = 'Some text';

Number

const num: number = 5;
@serhiiminin
serhiiminin / bash.sh
Last active June 21, 2019 10:09
bash commands
#!/bin/bash
##############################################################################
# SHORTCUTS
##############################################################################
CTRL+A # move to beginning of line
CTRL+B # moves backward one character
CTRL+C # halts the current command
CTRL+D # deletes one character backward or logs out of current session, similar to exit
@serhiiminin
serhiiminin / statement-of-work.md
Last active May 29, 2019 05:34
Statement of work

Pages

  • main
  • authorization
    • log in
    • sign up
    • forgot password
    • reset password
    • log out
  • words

Markdown

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

cURL

Without params
curl https://jsonplaceholder.typicode.com/todos - GET

  • -X - method
    curl -X POST https://jsonplaceholder.typicode.com/todos
  • -H - additional header
    curl -H "Accept: application/json" https://jsonplaceholder.typicode.com/todos
  • -d - pass data
    curl -X POST -d "{ id: '1' }" https://jsonplaceholder.typicode.com/todos
class Wrapper {
constructor(value) {
this._value=value;
}
map(f) {
return f(this._value);
}
fmap(f) {
return new Wrapper(f(this._value));
}
@serhiiminin
serhiiminin / appLastNews.md
Last active May 31, 2018 10:59
Todo list for `last news app`
  • jss
  • languages & categories
  • eslint
  • basic components for displaying selector tags
  • basic structure of a page (sidebar, main)
  • design (choose the colors)
  • routing
  • spinner
  • error handling (notifications)
  • flow (typing)