Skip to content

Instantly share code, notes, and snippets.

View alxpsr's full-sized avatar

alxpsr alxpsr

  • Artsofte
  • 🇷🇺 Russia
View GitHub Profile
@niespodd
niespodd / package.json
Last active May 8, 2023 09:07
Making web3/bitcore-lib work with Angular 6-11 and >=11
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
@PatrickJS
PatrickJS / ssr_material_fix.ts
Last active September 27, 2018 05:57
Angular 4 universal fixes for Material 2
global['document'] = {
createElement() {
return {
setAttribute: function(type) { this.type = type; },
type: '',
classList: { add: () => undefined }
};
},
documentElement: {
getBoundingClientRect: () => ({
@zmts
zmts / tokens.md
Last active November 14, 2024 15:57
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@ungoldman
ungoldman / curl_post_json.md
Last active October 27, 2024 00:49
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active November 9, 2024 20:40
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network