Skip to content

Instantly share code, notes, and snippets.

mightyCelu /
Last active May 24, 2018 12:13
Script for merging OmNET++ SQLite result files
import logging
import os
import os.path as osp
import sys
import sqlite3
schema = '''
mightyCelu /
Last active April 4, 2018 12:56
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 January 13, 2020 12:13
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 February 1, 2018 16:35
WLAN QR Code page generator
View wifi.tex.m4
\title{WLAN Access}
mightyCelu /
Created September 5, 2013 12:55
Backup script using rsync and ssh
if [ $# != 2 ]
echo usage: $0 SOURCE HOST
exit 1
mightyCelu / SpellPatch
Created March 28, 2013 20:36
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)))