Skip to content

Instantly share code, notes, and snippets.

@DasBlub
DasBlub / gist:6442358
Created September 4, 2013 20:21
implementation for cmangos/issues#201
commit 6012d86d203158fb6e89d83216a81a92a647abb8
Author: DasBlub <DasBlub@gmail.com>
Date: Wed Sep 4 22:19:12 2013 +0200
Add new optional parameter 'expansion' to command 'account create'
This fixes cmangos/issues#201
diff --git a/sql/mangos.sql b/sql/mangos.sql
index 5b915c3..d5e72e5 100644
@DasBlub
DasBlub / github-merge-helper.sh
Last active December 15, 2015 10:49
little merge helper script. might need a finishing touch
#!/bin/sh
# Function to fetch and merge a pull reqest
# Call with param1 == remote, param2 == Number
function merge_pull_request {
echo "Now fetching and merging pull-request $2 (from remote $1)"
git fetch $1 +refs/pull/$2/head:refs/remotes/$1/pr/$2
[[ $? -eq 0 ]] || exit 1
git merge $1/pr/$2
[[ $? -eq 0 ]] || exit 1
@DasBlub
DasBlub / bootstrap.sh
Last active December 15, 2015 07:39
bootstrap for CMaNGOS needs testing! TODO: - add DBs for classic & cata - test!
#!/bin/bash
###############################################################################
###############################################################################
###############################################################################
# helper functions
###############################################################################
# usage: check_dependency PROGRAM
function check_dependency {
@DasBlub
DasBlub / ACE_ExternalProject_partial_fix.diff
Created February 25, 2013 22:35
this is a partial fix for https://github.com/cmangos/mangos-wotlk/issues/94 but it does not fully work. TODO: replace the whole ExternalProject_Add stuff with a real CMakeLists.txt for ACE!
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af600f9..4517c5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,6 +143,15 @@ else()
set(LIBS_DIR ${CMAKE_INSTALL_PREFIX}/lib)
endif()
+# this needs to be defined before including ImportACE.cmake
+if(DEBUG)
@DasBlub
DasBlub / Program.cs
Created December 27, 2011 21:09
3te 11stellige primzahl in PI
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace _3te_11stellige_primzahl_von_pi
{
@DasBlub
DasBlub / gist:792218
Created January 23, 2011 17:12
SD2: Improve security for the MySQL DB
Index: sql/scriptdev2_create_database.sql
===================================================================
--- sql/scriptdev2_create_database.sql (revision 1954)
+++ sql/scriptdev2_create_database.sql (working copy)
@@ -1,4 +1,3 @@
CREATE DATABASE `scriptdev2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-GRANT ALL PRIVILEGES ON `scriptdev2` . * TO 'mangos'@'localhost' WITH GRANT OPTION;
-
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES ON `scriptdev2`.* TO 'mangos'@'localhost';
@DasBlub
DasBlub / gist:626932
Created October 14, 2010 20:08
SD2: fix compile for [10610]
Index: base/escort_ai.cpp
===================================================================
--- base/escort_ai.cpp (revision 1841)
+++ base/escort_ai.cpp (working copy)
@@ -123,7 +123,7 @@
if (!m_creature->CanInitiateAttack())
return;
- if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE)
+ if (!m_creature->CanFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE)
@DasBlub
DasBlub / gist:624612
Created October 13, 2010 18:40
SD2: fix compile warning
Index: scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h
===================================================================
--- scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h (revision 1841)
+++ scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h (working copy)
@@ -45,7 +45,7 @@
void SetData(uint32 uiType, uint32 uiData);
const char* Save() { return strInstData.c_str(); }
void Load(const char* chrIn);
- void Update(const uint32 uiDiff);
+ void Update(uint32 uiDiff);
Index: VC100/100ScriptDev2.vcxproj.filters
===================================================================
--- VC100/100ScriptDev2.vcxproj.filters (revision 1820)
+++ VC100/100ScriptDev2.vcxproj.filters (working copy)
@@ -501,13 +501,13 @@
<ClCompile Include="..\scripts\eastern_kingdoms\deadmines\instance_deadmines.cpp">
<Filter>scripts\eastern_kingdoms\deadmines</Filter>
</ClCompile>
- <ClCompile Include="..\scripts\eastern_kingdoms\gnomeregan\boss_thermaplugg.cpp" />
+ <ClCompile Include="..\scripts\eastern_kingdoms\gnomeregan\boss_thermaplugg.cpp">
@DasBlub
DasBlub / gist:577540
Created September 13, 2010 16:22
Quest 10427: Creatures of the Eco-Domes
Index: scripts/world/spell_scripts.cpp
===================================================================
--- scripts/world/spell_scripts.cpp (revision 1833)
+++ scripts/world/spell_scripts.cpp (working copy)
@@ -32,6 +32,7 @@
spell 46023
spell 47575
spell 50706
+spell 35771
spell 45109