Skip to content

Instantly share code, notes, and snippets.

@JMatthewman
JMatthewman / .games
Last active February 10, 2023 01:36
SRV-Management.sh
#!/bin/bash
recognise() {
prefix="${srv%%-*}"
prefix="${prefix^^}"
case $prefix in
"CSS") { # CounterStrike: Source
game="CounterStrike: Source"
CSS-start() {
if [ $startupvars = $srv ]
then
@JMatthewman
JMatthewman / MemoryStickSync.ps1
Created November 8, 2012 23:26
Powershell script to listen for drive connection, check if it matches a predefined list and run the required sync.
# Memory Stick Backup Syncronisation script
# By Joel Matthewman 08/11/2012
#
# Customizations:
# Ln 13 path to SyncToyCMD.exe (you may need to change to x86 or other obscure location)
# Ln 23 Location of dropbox.exe
# Ln 29 Drive definitions with drive letter and name, and names of any SyncPairs to syncronise
#
#
@JMatthewman
JMatthewman / TS3Radio.php
Last active December 16, 2015 17:19
TS3Radio.php A script to receive now playing information from HTTP GET requests, and output the information to chat from a specific account via TeamSpeak Client Query interface
<?php
{// Start Timer
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
}
{// Preamble
//////////////////////////////////////////////////////////////////////////////////////
#!/bin/bash
if [ $# -lt 3 ]
then
echo "Useage: [string] [loops] [interval]"
else
STRING=$1
COUNTER=$2
INTERVAL=$3
if [ "$(screen -ls | grep TS3client)" == "" ]
@JMatthewman
JMatthewman / ll alias.sh
Last active February 26, 2018 08:16
an alias to execut ls -lah with colour, and create octal permissions output
function ll() {
if [ "$*" == "" ]
then
input=./
else
input=$*
fi
ls "$input" -lah --color | awk '{
k = 0