Skip to content

Instantly share code, notes, and snippets.

@vsc1t
vsc1t / terraform_vscale_provider.sh
Created Jul 7, 2019
Terraform add vscale provider
View terraform_vscale_provider.sh
#!/usr/bin/env bash
# Automatic install vscale provider for terraform
# GOPATH should be configured before launch
source ~/.profile
sudo apt-get update && sudo apt-get install git -y && \
mkdir -p "$GOPATH"/src/github.com/terraform-providers/terraform-provider-vscale && \
git clone https://github.com/burkostya/terraform-provider-vscale.git \
"$GOPATH"/src/github.com/terraform-providers/terraform-provider-vscale && \
@vsc1t
vsc1t / terraform_install.sh
Created Jul 7, 2019
Terraform 12.3 install and configure
View terraform_install.sh
#!/usr/bin/env bash
# Install and configure terraform for Linux 64-bit
PLUGINS_CACHE_DIR='$HOME/.terraform.d/plugin-cache'
TERRAFORM_VERSION='terraform_0.12.3_linux_amd64.zip'
TERRAFORMRC="$HOME/.terraformrc"
TERRAFORM_LOCATION="$HOME/.local/bin"
EXPORT_LOCAL_PATH='export PATH=$PATH:'"$LOCAL_PATH"
@vsc1t
vsc1t / Install_go.sh
Created Jul 7, 2019
Easiest install and configure GO on Ubuntu
View Install_go.sh
#!/usr/bin/env bash
# Install GO for Ubuntu 18.04
# First argument spcify GOPATH varibale
# By default GOPATH=~/go
if [ "$1" ] ; then
GO_DIR=$1
else
GO_DIR='$HOME/go'
@vsc1t
vsc1t / sshd_config
Created Sep 19, 2018
simple sshd config
View sshd_config
PermitRootLogin prohibit-password
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
X11Forwarding yes
PrintMotd no
Banner none
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
View .bashrc
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vsc1t
vsc1t / tmux-cheats.md
Created Aug 17, 2018 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.
View tmux-cheats.md

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session