Skip to content

Instantly share code, notes, and snippets.

View rtatarinov4xxi's full-sized avatar

rtatarinov4xxi

View GitHub Profile
@rtatarinov4xxi
rtatarinov4xxi / usefullCommands.js
Last active February 25, 2020 10:21
Docker usefull command
// Encode password and get it
docker-compose exec php bin/console security:encode-password
// Clean all not useful containers
docker system prune -a
docker volume prune // WARNING! it command remove all database
// Update database by key
update users set "confirmed" = true // set all users confirmed
update users set "password" = '$2y$13$tbgx1NP/YnzuiJYtZBPF8.wHc72rB5qzc5nTsan5TniQZmZkmlj2i' // set all users password '1'
@rtatarinov4xxi
rtatarinov4xxi / useRequest.ts
Last active August 26, 2023 03:51
useRequest hook with Axios by typescript (with examples)
import { useState } from 'react';
import axios from 'axios';
type RequestConfig = {
url?: string;
baseURL?: string;
initialIsLoading?: boolean;
withCredentials?: boolean;
onSuccess?: Function;
onError?: Function;
@rtatarinov4xxi
rtatarinov4xxi / generate-ssh-key.sh
Created September 2, 2020 09:14 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa