Skip to content

Instantly share code, notes, and snippets.

Avatar

Samuel Turner SamuelTurner

View GitHub Profile
@SamuelTurner
SamuelTurner / Simple Minecraft Server Backup Script
Last active Aug 29, 2015
Simple Minecraft Server Backup Script
View Simple Minecraft Server Backup Script
#!/bin/bash
cd /home/<user>/Minecraft/mcserver/
SESSION_NAME='mcserver'
# Stop all detached screen sessions with this name
for session in $(screen -ls | grep -o "[0-9]*\.$SESSION_NAME")
do
echo "Closing Screen: $session"
screen -S "$session" -X stuff "stop $(echo -ne '\r')"
View .bashrc
# Colors for the prompt
blue="\033[0;34m"
white="\033[0;37m"
green="\033[0;32m"
red="\033[0;31m"
purple="\033[0;35m"
# Brackets needed around non-printable characters in PS1
ps1_blue='\['"$blue"'\]'
ps1_green='\['"$green"'\]'
@SamuelTurner
SamuelTurner / changedCssClassSearch.sh
Created Sep 13, 2017
Script to compare a git branch with a base branch, find the changed/added/removed CSS classes, and search the codebase for uses
View changedCssClassSearch.sh
#!/bin/bash
# Changed CSS Class Search
# ------------------------
# Script to compare a git branch with a base branch, find the changed/added/removed CSS classes, and search the codebase for uses
#
# Required params:
# --base - The base branch
# --compare - The branch to compare
# --extension - The file extension to search in
You can’t perform that action at this time.