Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@WillSams
WillSams / bowling-ruby_tdd_kata-Debian.sh
Last active March 19, 2019 22:25
Ruby Bowling Game Kata
set -o nounset # unset variables are errors
__ScriptVersion="2018.02.19"
__ScriptName="bowling-ruby_tdd_kata-Debian.sh"
__ScriptFullName="$0"
if [ -d $HOME/.rvm ]; then
echo "RVM /w Ruby is already installed on your machine."
else
echo "********************** RVM & RUBY INSTALL ************************"
@WillSams
WillSams / Example.js
Created April 26, 2018 20:12
React-Wysiwyg via extend React.Component
var React = require('react')
var ReactDOM = require('react-dom')
var ContentEditable = require('react-wysiwyg')
class Example extends React.Component {
constructor(props){
super(props)
this.state = {
text: '',
editing: false
@WillSams
WillSams / mongodb-setup.sh
Last active July 12, 2021 22:08
Simple MongoDB Setup Script for Ubuntu 18.04
#!/bin/bash
#
# MongoDB script
#
# Pre-req: Ubuntu Bionic (18.04) flavored distro
# Note: To expose your server to the network, set bind to 0.0.0.0 in /etc/mongod.conf
#
# Recommended for first time users: create a VM, ssh into it, 'wget' the raw version of this gist.
@WillSams
WillSams / linux-devel-setup.sh
Last active January 25, 2019 23:33
NodeJS, Ruby, and .NET install script for Ubuntu 18.04 'bionic'
#!/bin/bash
# The 'get you set up w/ NodeJS, Ruby, and .NET on Linux' script
#
# Pre-req: Ubuntu Bionic (18.04) desktop or server
#
# Note: This script makes a few assumptions for you:
# 1) If you don't have RVM and Ruby installed, this script will download and source it for you.
# DO NOT EXECUTE this script if you already have Ruby installed and not currently using RVM.
# 2) If you don't have a ~/.npm-global available, this script will create it for you.
@WillSams
WillSams / nginx-grandnode.sh
Last active January 25, 2019 23:51
Install script for Nginx & GrandNode .NET for Ubuntu 18.04 'bionic'
#!/bin/bash
# Nginx installer script - Grandnode.NET example
#
# Pre-req:
# * Ubuntu Bionic (18.04) flavored distro
# * Script must be executed under the account of the web admininstrator
# * linux-devel-setup.sh - https://gist.github.com/WillSams/f17427b5a4f5bccc23d6efe1389b33ca
# * mongodb-setup.sh - https://gist.github.com/WillSams/3588b69c805acf07ccb278c55fd91302
#
@WillSams
WillSams / nginx-keystone.sh
Last active January 25, 2019 23:46
Install script for Nginx & Keystone JS for Ubuntu 18.04 'bionic'
#!/bin/bash
# Nginx installer script - Keystone JS example
#
# Pre-req:
# * Ubuntu Bionic (18.04) flavored distro
# * Script must be executed under the account of the web admininstrator
# * linux-devel-setup.sh - https://gist.github.com/WillSams/f17427b5a4f5bccc23d6efe1389b33ca
# * mongodb-setup.sh - https://gist.github.com/WillSams/3588b69c805acf07ccb278c55fd91302
@WillSams
WillSams / nginx-rails.sh
Last active February 1, 2019 15:15
Install script for Nginx & Ruby-on-Rails for Ubuntu 18.04 'bionic'
#!/bin/bash
# Nginx installer script - Ruby On Rails example
#
# Pre-req:
# * Ubuntu Bionic (18.04) flavored distro
# * Script must be executed under the account of the web admininstrator
# * linux-devel-setup.sh - https://gist.github.com/WillSams/f17427b5a4f5bccc23d6efe1389b33ca
# * mongodb-setup.sh - https://gist.github.com/WillSams/3588b69c805acf07ccb278c55fd91302
#
@WillSams
WillSams / install-salt-minion.sh
Last active January 31, 2019 21:14
Install and Configure Salt Minion on Debian-based System
#!/bin/bash
set -o nounset # unset variables are errors
SCRIPTVERSION="2019.01.25-Debian"
SCRIPTNAME="install-salt-minion.sh"
SCRIPTFULLNAME="$0"
SALTMASTER='192.168.56.101' #IP of Salt-master
echoerror() { printf "\033[1;31m * ERROR\033[0m: %s\\n" "$@" 1>&2; }
@WillSams
WillSams / install-salt-master.sh
Last active February 5, 2019 13:48
Install and Configure Salt Master on Debian-based System
#!/bin/bash
set -o nounset # unset variables are errors
SCRIPTVERSION="2019.01.25-Debian"
SCRIPTNAME="install-salt-master.sh"
SCRIPTFULLNAME="$0"
BROADCAST='192.168.56.1/24' #local network broadcast IP & subnet
echoerror() { printf "\033[1;31m * ERROR\033[0m: %s\\n" "$@" 1>&2; }
@WillSams
WillSams / ssh_on_vbox_mv.sh
Last active March 29, 2023 12:38
Configuring SSH & Hostname on Virtual Box VM
#!/bin/bash
# **************** CONFIGURATION FOR LOGGING INTO VM FROM HOST VIA SSH ******************
#
# Download and execute this script on your VM, not your host machine
#
# Pre-req:
# - Ensure you have openssh-server installed on the VM.
# - Go to File-> Host Network Manager -> Create. DO NOT enable `DHCP Server`.
#
# In your VM's settings, go to Network tab, add a 2nd network adapter and do the following: