Skip to content

Instantly share code, notes, and snippets.

View rodtreweek's full-sized avatar

Rod Treweek rodtreweek

  • Portland, OR
View GitHub Profile
#!/bin/bash
set -e
GVERSION="1.7"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directory already exists $GOROOT"
@rodtreweek
rodtreweek / vim_8_build
Last active August 28, 2018 11:39
Building Vim 8 from source.
1.
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
2.
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox
3.
cd ~
git clone https://github.com/vim/vim.git
cd vim
#!/bin/bash
echo "[ build and install vim from source ]"
# Create directories...
sudo mkdir -p ~/fs/dev;
# This script needs "fpm". If you don't have it
# install ruby, etc. with:
sudo apt-get install ruby ruby-dev build-essential;
@rodtreweek
rodtreweek / README.md
Created October 26, 2017 10:44 — forked from seansawyer/README.md
Managing OpenStack instances with Ansible through an SSH bastion host

Managing OpenStack instances with Ansible through an SSH bastion host

I'm be using DreamCompute as my OpenStack provider, but there are dozens to choose from. I assume you already have Ansible and the OpenStack CLI tools installed.

Motivation

With the proliferation of OpenStack public clouds offering free and intro tiers, it's becoming very easy to effectively run a simple application for free or nearly free. Also with the emergence of Ansible, you don't need to learn and deploy complicated tools to do configuration management.

@rodtreweek
rodtreweek / GitLab-CE on Windows 10
Created October 27, 2017 08:49 — forked from kingbin/GitLab-CE on Windows 10
Using Docker toolbox to create a persistent Gitlab-CE install in Windows 10
$ docker create --name gitlab-data --volume /d/docker/gitlab:/etc/gitlab gitlab/gitlab-ce:latest
# Make sure Bridging is set on the VM in VirtualBox
$ docker run --publish 8080:80 --publish 2222:22 --publish 4443:443 --name gitlab --restart always --volumes-from gitlab-data gitlab/gitlab-ce:latest
Using docker 1.13.1
@rodtreweek
rodtreweek / pedantically_commented_playbook.yml
Created October 27, 2017 19:23 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@rodtreweek
rodtreweek / tmux-cheat-sheet.md
Created January 19, 2018 02:13 — forked from michaellihs/tmux-cheat-sheet.md
tmux Cheat Sheet
@rodtreweek
rodtreweek / ansible-win-10-wsl-config.sh
Created January 30, 2018 01:06 — forked from gregjhogan/ansible-win-10-wsl-config.sh
ansible windows 10 WSL configuration
sudo apt-get -y update
sudo apt-get -y install python
sudo easy_install pip
sudo pip install ansible
sudo pip install "pywinrm>=0.2.2"
# kerberos authentication support
#sudo apt-get install -y python-dev libkrb5-dev krb5-user
#sudo pip install pywinrm[kerberos]
@rodtreweek
rodtreweek / sed cheatsheet
Created February 7, 2018 18:25 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@rodtreweek
rodtreweek / WSL-ssh-server.md
Created July 12, 2018 19:07 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
  3. Change UsePrivilegeSeparation to no