Skip to content

Instantly share code, notes, and snippets.

View hareeshpc's full-sized avatar

Hareesh P hareeshpc

  • Stockholm, Sweden
View GitHub Profile
@hareeshpc
hareeshpc / 0_reuse_code.js
Last active December 5, 2017 07:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hareeshpc
hareeshpc / vagrant_virtualbox_centos7.md
Last active February 19, 2022 06:17
Vagrant installation on Headless ubuntu server (14.04.1) with CentOS and remote ssh login

Installation of virtual box headless

This was obtained from y-yoshinoya at https://gist.github.com/y-yoshinoya/413fcd3f6bfcfce54456

wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list'
sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.3 dkms

##Installing Virtualbox:

$ sudo apt-get install virtualbox
$ sudo apt-get install virtualbox-dkms

##Installing Vagrant:

$ sudo apt-get install vagrant
@hareeshpc
hareeshpc / vagrant_with_libvirt_provider.txt
Last active December 5, 2017 07:29
vagrant_with_libvirt_provider
# KVM and Qemu
yum install -y qemu-kvm \
qemu-img \
virt-manager \
libvirt \
libvirt-python \
python-virtinst \
libvirt-client \
virt-install \

Reference

https://www.nadeau.tv/ssh-with-a-bastion-host/

One Liner

ssh -o ProxyCommand='ssh -W %h:%p user@bastion' user@target

Config based

To let scp/rsync/debuuger connect, edit your ~/.ssh/config file to define the proxy command and other params. For example:

Prerequisites

Virtual box preconfig

When starting virtual box it was missing the required kernel headers. First get them by

sudo yum install kernel-devel 
sudo /sbin/vboxconfig
Dockerfile
----------
FROM python:3-alpine
#FROM fedora:latest
ADD ipvs.py /
RUN pip install gnlpy six
CMD [ "python", "./ipvs.py" ]
@hareeshpc
hareeshpc / vimrc_wip
Created August 2, 2019 11:52
Vimrc wip
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/seoul256.vim'
Plug 'ConradIrwin/vim-bracketed-paste'
Plug '/home/hareesh/.fzf'
Plug 'junegunn/fzf.vim'
Plug 'https://github.com/Alok/notational-fzf-vim'
Plug 'vim-airline/vim-airline'
" Initialize plugin system

Salt

Salt architecture

Master-minion architecture

  • ZeroMQ based transport
    • network topology
  • concurrency

Dev Machine

Setting up a personal development machine

Required software

  • git
  • Vim 8.0
  • Tmux
  • fzf