Skip to content

Instantly share code, notes, and snippets.

View lloydroc's full-sized avatar

Lloyd Rochester lloydroc

  • Denver, Colorado
View GitHub Profile
@lloydroc
lloydroc / vbox_setup.sh
Created August 17, 2016 04:32
Steps Setting up Virtual Box
cd ~
mkdir avm
mkdir avm/downloads
mkdir avm/dvd
mkdir avm/vms
mkdir avm/bin
mkdir avm/shares
mkdir avm/log
cd ~/avm/downloads
@lloydroc
lloydroc / vbcreate.sh
Last active August 23, 2016 14:09
Script to create virtual machines using the VirtualBox commands on the cli
# Useful commands
# VBoxManage list vms
# VBoxManage showmediuminfo avm/dvd/dsl-4.4.10-x86.vdi
# VBoxManage list hostonlyifs
# VBoxManage list intnets
# VBoxManage list ostypes | more
# VBoxManage showvminfo f-1
# VBoxManage list hostdvds
if [ ! -f ~/.vbconfig ]; then
@lloydroc
lloydroc / vbsetup.sh
Created August 23, 2016 14:08
Set up directory structure for VirtualBox to manage virtual machines on the host machine
#!/bin/sh
VB_BASE_LOC=$HOME/avm
VB_DLS_LOC=$VB_BASE_LOC/downloads
VB_DVD_LOC=$VB_BASE_LOC/dvd
VB_VMS_LOC=$VB_BASE_LOC/vms
VB_BIN_LOC=$VB_BASE_LOC/bin
VB_SHR_LOC=$VB_BASE_LOC/shares
VB_LOG_LOC=$VB_BASE_LOC/log
mkdir $VB_BASE_LOC
@lloydroc
lloydroc / .tmux.conf
Created September 7, 2016 02:17
Configuration File for TMUX
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Enable mouse control (clickable windows, panes, resizable panes)
@lloydroc
lloydroc / .ctags
Created October 13, 2016 22:22
Example ~/.ctags file that gives support for Scala and XML
--exclude=*html
--exclude=*.jar
--exclude=*.class
--exclude=*.erl
--exclude=*.hrl
--exclude=*.fxs
-R
--langdef=xml
--langmap=xml:.xml
--regex-xml=/<([a-zA-Z0-9]+)[^\/]*>/\1/t,tagname/
@lloydroc
lloydroc / laravel_install.txt
Last active November 29, 2016 05:19
Laravel Install Notes
# From https://laravel.com/docs/5.3#installing-laravel
composer global require "laravel/installer" # then add $HOME/.composer/vendor/bin to your path
#source your shell rc file to pick up the laravel binary
laravel new example_project
# Dev environment can be Homestead (runs off virtualbox) or Valet (OS X only) for minimalists running the caddy server
# now make some controllers
php artisan make:controller ControllerName
# Add some vendor dependencies
This file has been truncated, but you can view the full file.
-- MySQL dump 10.13 Distrib 5.7.16, for osx10.12 (x86_64)
--
-- Host: localhost Database: homestead
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@lloydroc
lloydroc / nah
Created December 17, 2016 22:14
alias nah='git reset --hard; git clean -df'
@lloydroc
lloydroc / linodefresh.txt
Last active December 23, 2016 04:56
Fresh Linode Installation
# Create an image (Ubuntu 16.04 LTS) and boot it up - see https://www.linode.com/docs/getting-started for help
# ssh into it
# install nginx - https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install zsh
sudo apt-get install git
sudo apt-get install nginx
sudo ufw app list
sudo ufw allow 'OpenSSH
# run multiple websites from nginx
# https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3
chgrp -R www-data /var/www
sudo chmod 775 /var/www
sudo mkdir -p /var/www/example.com/public_html
sudo chown -R www-data:www-data /var/www/example.com/public_html
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/example.com
sudo vi /etc/nginx/sites-available/example.com
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
sudo rm /etc/nginx/sites-enabled/default