This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --net=host -it cmssw/zookeeper & | |
docker run --net=host -it cmssw/mesos-master & | |
docker run --net=host -it cmssw/marathon & | |
docker run --net=host \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /usr/local/bin/docker:/usr/bin/docker \ | |
-v /sys:/sys \ | |
-it \ | |
cmssw/mesos-slave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Some generic stack based tree walker. | |
template <class T> | |
class StackItem | |
{ | |
public: | |
typedef T Node; | |
StackItem(Node *parent, Node *pre, Node *post) | |
: m_parent(parent), | |
m_pre(pre), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A simple SAX-like parser. | |
And yes, I know the S in SAX stands for Simple. | |
Copyright 2010 Giulio Eulisse. All rights reserved. | |
Licensed under GPLv3 license. | |
TODO: incomplete support for entities. | |
TODO: no support for DTD nor <?xml> preamble. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from optparse import OptionParser | |
from commands import getstatusoutput | |
from sys import exit | |
if __name__ == "__main__": | |
parser = OptionParser(usage="%prog <pid>") | |
parser.add_option("--json", "-j", dest="json", help="dump output as JSON dictionary", action="store_true", default=False) | |
opts, args = parser.parse_args() | |
if len(args) != 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from glob import glob | |
from optparse import OptionParser | |
from os.path import join, basename | |
from email import message_from_file | |
from os import getenv | |
from os.path import splitext | |
import re | |
if __name__ == "__main__": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from optparse import OptionParser | |
from commands import getstatusoutput | |
from sys import exit | |
description="""A simple script which dumps all the addresses for call/callq instructions of a given process. | |
""" | |
if __name__ == "__main__": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def usePythonWithModule(modulename): | |
import os | |
import sys | |
from os.path import exists, dirname, basename, join | |
try: | |
__import__(modulename) | |
except: | |
pythonpath = os.path.dirname(sys.executable) | |
check = False | |
for x in [x for x in os.environ["PATH"].split(":") if x]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace { | |
template <class T> | |
struct entry { | |
char const* label; | |
T value; | |
}; | |
constexpr bool same(char const *x, char const *y) { | |
return !*x && !*y ? true | |
: /* default */ (*x == *y && same(x+1, y+1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#table_" + currentRelease).selectable({ | |
selected: function (event, ui) { | |
var checkBoxes = $(ui.selected).find("input"); | |
if ($(ui.selected).hasClass('click-selected')) { | |
$(ui.selected).removeClass('ui-selected click-selected'); | |
checkBoxes.prop("checked", !checkBoxes.prop("checked")); | |
} else { | |
$(ui.selected).addClass('click-selected'); | |
checkBoxes.prop("checked", !checkBoxes.prop("checked")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOO=<your-package-to-cleanup> | |
git cms-addpkg $FOO | |
cd $CMSSW_BASE/src | |
find . -type f -exec sed -i "/[$][Dd]ate:[^$]*[$]/d" {} \; | |
find . -type f -exec sed -i "/[$][Ii]d:[^$]*[$]/d" {} \; | |
find . -type f -exec sed -i "/[$][Aa]uthor:[^$]*[$]/d" {} \; | |
find . -type f -exec sed -i "/[$][Rr]evision[^$]*[$]/d" {} \; | |
find . -type f -exec sed -i "/[$][Ll]og:[^$]*[$]/d" {} \; | |
find . -type f -exec sed -i "/[$][Ss]ource:[^$]*[$]/d" {} \; |
OlderNewer