Skip to content

Instantly share code, notes, and snippets.

View paveltimofeev's full-sized avatar

Pavel Timofeev paveltimofeev

View GitHub Profile
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com
# 1. DOWNLOAD AND INSTALL OUTLINE MANAGER
# 2. DOWNLOAD AND INSTALL OULINE CLIENT AT ALL CLIENTS
# 3. CRAETE VM
# AT AWS FOR EXAMPLE,
# LIKE LOW COST t3a.micro WITH NETWORK SPEED UPTO 5Gb AND Amazon Linux OS - AMI: amazon/amzn2-ami-hvm-2.0.20220218.3-x86_64-gp2,
# OPEN ALL INBOUND TCP PORTS,
# CREATE SSH KEYS AND SET `chmode 400` FOR IT
# 4. CONNECT AND EXECUTE
ssh -i "xxx.pem" ec2-user@xxx-xxx-xxx-xxx-xxx.compute-1.amazonaws.com 'sudo yum update -y; sudo yum install docker -y; sudo systemctl start docker; sudo bash -c "$(wget -qO- https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh)"'
@paveltimofeev
paveltimofeev / auto-layout.css
Created October 26, 2021 17:37
auto-layout.css
.l-vertical { display: flex; flex-direction: column; }
.l-horizontal { display: flex; flex-direction: row; }
.l-content-packed { justify-content: flex-start;}
.l-content-space-between { justify-content: space-between;}
.l-content-top-left {}
.l-content-top-center {}
.l-content-top-right {}
.l-content-center-left {}
@paveltimofeev
paveltimofeev / gist:6eaba90ddf65498dd18da9cb817e3017
Last active July 29, 2021 08:19
WebStorm settings for Angular (Single/Double Quotas)
@paveltimofeev
paveltimofeev / angular-tricks.md
Last active April 14, 2021 06:05
Angular Tricks

Angular tricks

How to get ref of parent component

@Component({
    selector: 'app-my-child',
    templateUrl: './app-my-child.component.html'
})
export class MyChildComponent {

Articles, Styletiles & Styleguide

Frameworks

@paveltimofeev
paveltimofeev / EvolutionarySearchAlgorithm.cs
Created May 31, 2018 21:33
Evolutionary Search Algorithm
using System;
using System.Collections;
using System.Collections.Generic;
public class EvolutionarySearchAlgorithm<T> {
System.Random random = new System.Random();
Func<T, T> mutationFunc;
IComparer<T> evaluationFunc;
@paveltimofeev
paveltimofeev / ya-not-interesting-this.js
Last active April 25, 2018 08:41
ya: not-interesting-this
$('.yap-adtune-icon').click() && $('.yap-abuse-complaint__link:Contains(Не интересуюсь этой темой)').each((e, t) => { t.click()});
$("yatag > yatag > svg").each(
(e, t) => {
setTimeout(function () {
$(t).parent().click();
$('yatag > a:Contains(Не интересуюсь этой темой)').each((e, t) => {t.click()});
}, 1000 * (e + 1));
});
@paveltimofeev
paveltimofeev / VueJS.scaffold.html
Created November 28, 2017 15:36
VueJS Scaffolding
<html>
<head>
<script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="app" v-on:click="sayHello('John', $event)">
{{ message }}
</div>
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\New Windows" /f /v PopupMgr /t REG_SZ /d no
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\New Windows" /f /v BlockUserInit /t REG_SZ /d no
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\New Windows" /f /v UserInitTimeout /t REG_SZ /d no