Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@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 / 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-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 / 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 / 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 / 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 / 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 / nfs_instructions
Last active February 19, 2018 01:33
NFS Setup on Linux For XBox One Kodi
#note: Kodi on Xbox One only sees it via the IP so just search available NFS servers instead of searching via hostname
sudo su
apt install nfs-kernel-server
cat > /etc/exports << EOF
/<path to music>/ 192.168.1.0/24(rw,sync,no_subtree_check)
/<path to movies>/ 192.168.1.0/24(rw,sync,no_subtree_check)
/<path to tv>/ 192.168.1.0/24(rw,sync,no_subtree_check)
EOF
@WillSams
WillSams / 2018-samba
Last active January 13, 2023 17:04
Easy samba configuration
sudo bash -c "apt update && sudo update -y"
sudo bash -c "apt install samba"
sudo smbpasswd -a # type in a password
sudo bash -c "echo '
####################################################
[videos]
path = $HOME/Pictures
available = yes
valid users =
@WillSams
WillSams / Installing Rails
Last active September 2, 2022 17:01
My Ruby-on-Rails development environment
#The "official" way on gorails has issues if Ruby is already installed. So, use the rvm method
mkdir ruby-dev && cd ruby-dev
sudo bash -c "apt update"
sudo bash -c "apt install gnupg2"
ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin
gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable