Skip to content

Instantly share code, notes, and snippets.

View RagedUnicorn's full-sized avatar

Raged Unicorn RagedUnicorn

View GitHub Profile
@RagedUnicorn
RagedUnicorn / Config.wtf
Created March 20, 2019 20:03
WoW Vanilla Use Custom Resolution
SET hwDetect "0"
SET gxColorBits "24"
SET gxDepthBits "24"
SET gxResolution "3440x1440"
SET gxMultisampleQuality "0.000000"
SET fullAlpha "1"
SET lodDist "100.000000"
SET SmallCull "0.010000"
SET DistCull "500.000000"
SET trilinear "1"
@RagedUnicorn
RagedUnicorn / bnetserver.conf.tpl
Last active April 19, 2019 18:54
A config template for tf-aws-wow-legion-server
###############################################
# Trinity Core Auth Server configuration file #
###############################################
[bnetserver]
###################################################################################################
# SECTION INDEX
#
# EXAMPLE CONFIG
# AUTH SERVER SETTINGS
@RagedUnicorn
RagedUnicorn / worldserver.conf.tpl
Created March 8, 2019 20:41
A config template for tf-aws-wow-legion-server
################################################
# Trinity Core World Server configuration file #
################################################
[worldserver]
###################################################################################################
# SECTION INDEX
#
# EXAMPLE CONFIG
# CONNECTIONS AND DIRECTORIES
@RagedUnicorn
RagedUnicorn / bash_check_port.sh
Created December 29, 2018 17:34
Example for checking a port in bash
#!/bin/sh
# simple script to check if a port on a host is reachable
host=$1
port=$2
if [[ -z "$host" ]] || [[ -z "$port" ]];then
echo "Usage: check_port <host> <port>"
exit 1
fi
@RagedUnicorn
RagedUnicorn / bash_array.sh
Created December 29, 2018 17:34
Examples for arrays in bash
#!/bin/bash
# add multiple values to an array
array=(value1 value2 value3 value4)
# add a value to a specified index
array[2]=value3
# print an array element
echo ${array[2]}
@RagedUnicorn
RagedUnicorn / bash_check_for_error.sh
Created December 29, 2018 17:33
Example for checking for an error in bash
#!/bin/bash
# do some operation
which make > /dev/null 2> /dev/null
# if $? is != 0 an error happened in the last command
if [ $? = 0 ]; then
echo "last operation was successful"
fi
@RagedUnicorn
RagedUnicorn / git_diff.sh
Created December 29, 2018 17:29
Git diff examples
// generate a diff between a branch and the master
git diff master..[branch]
// generate a diff between last commit and current directory
git diff
// if theres already staged data you can see a diff of only the cached files
git diff --cached
// shows the diff between the index and your last commit
@RagedUnicorn
RagedUnicorn / git_delete_remote_name.sh
Created December 29, 2018 17:28
Example for deleting a remote name in Git
# remove an remote name
git remote rm [remote name]
# now its possible to create the remote name again with
remote add [remote-address]
@RagedUnicorn
RagedUnicorn / git_delete_remote_branch.sh
Created December 29, 2018 17:27
Example for deleting a remote branch in Git
// delete a remote branch on github
git push origin :[branchname]
@RagedUnicorn
RagedUnicorn / unpack_tar.gz.sh
Created December 29, 2018 17:25
Example for unpackaging a tar.gz archive
# unpack a tar.gz archive
# params:
# x = extract files from tar archive
# z = decompress the archive with gzip
# f = path to the file that should get unpacked
tar -xzf archiv.tar.gz