Skip to content

Instantly share code, notes, and snippets.

mightyCelu /
Last active May 24, 2018
Script for merging OmNET++ SQLite result files
import logging
import os
import os.path as osp
import sys
import sqlite3
schema = '''
mightyCelu /
Last active Apr 4, 2018
Helper to replace parts of a file with corresponding values
import os
from string import Template
def configure_file(template_filename, out, **kwargs):
"""Rewrites placeholders within the file according to the given argument
The file specified by template_filename is read. Occurences of template values (e.g. identifiers prefixed with '$',
for more details see string.Template) are replaced with the corresponding keyword argument value. The resulting file
is written to out. If out is a directory, the template's filename is stripped of the '.in' extension and used as
mightyCelu /
Last active Jan 13, 2020
ROS smach state for waiting for a message up to some amount of time
import roslib; roslib.load_manifest('smach_ros')
import rospy
import threading
import smach
__all__ = ['TimeoutState']
mightyCelu / wifi.tex.m4
Created Feb 1, 2018
WLAN QR Code page generator
View wifi.tex.m4
\title{WLAN Access}
mightyCelu /
Created Sep 5, 2013
Backup script using rsync and ssh
if [ $# != 2 ]
echo usage: $0 SOURCE HOST
exit 1
mightyCelu / SpellPatch
Created Mar 28, 2013
Fix for Lightwell bug in MaNGOS
View SpellPatch
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 3ceb20b..c18d5cb 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3143,8 +3143,8 @@ void Spell::_handle_immediate_phase()
if (m_spellInfo->Effect[j] == 0)
- // apply Send Event effect to ground in case empty target lists
- if (m_spellInfo->Effect[j] == SPELL_EFFECT_SEND_EVENT && !HaveTargetsForEffect(SpellEffectIndex(j)))