Skip to content

Instantly share code, notes, and snippets.

View petriichuk's full-sized avatar

Taras Petriichuk petriichuk

View GitHub Profile
@petriichuk
petriichuk / main.cpp
Created November 30, 2017 06:27
Binary Search Tree c++
//
// main.cpp
// bts
//
// Created by Taras Petriichuk on 30/11/2017.
// Copyright © 2017 Taras Petriichuk. All rights reserved.
//
#include <iostream>
using namespace std;
@petriichuk
petriichuk / CopyKeyToRemote.txt
Last active September 10, 2017 20:50
Copy ssh keys to remote server
ssh root@0.0.0.0
adduser sammy
usermod -aG sudo sammy
#onLocal
cat ~/.ssh/id_rsa.pub
#onRemote
su - sammy
mkdir ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys #paste key
@petriichuk
petriichuk / GitDeployConf
Last active December 18, 2016 08:58
ServerConfigurationCommands(Ubuntu 16.4)
https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
#REMOTE SERVER
#install
sudo apt-get install git-core
#copy your username and email in the gitconfig file
sudo nano ~/.gitconfig
git config --global user.name "NewUser"
git config --global user.email newuser@example.com