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
# Cleanup old alternatives | |
update-alternatives --remove-all cc | |
update-alternatives --remove-all c++ | |
update-alternatives --remove-all gcc | |
update-alternatives --remove-all g++ | |
update-alternatives --remove-all clang | |
update-alternatives --remove-all clang++ | |
update-alternatives --remove-all icc | |
update-alternatives --remove-all icc++ |
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
#!/bin/bash | |
if [ ! -n "$1" ] | |
then | |
echo "Usages: sh uwsgiserver.sh [start|stop|restart]" | |
exit 0 | |
fi | |
if [ $1 = start ] | |
then | |
psid=`ps aux | grep "uwsgi" | grep -v "grep" | wc -l` |
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
"""Slightly magical Win32api Registry -> Dictionary-like-object wrapper""" | |
import win32api, win32con, cPickle | |
class RegistryDict(object): | |
def __init__(self, keyhandle = win32con.HKEY_LOCAL_MACHINE, keypath = [], flags = None): | |
"""If flags=None, then it will create the key.. otherwise pass a win32con.KEY_* sam""" | |
self.keyhandle = None | |
self.open(keyhandle, keypath, flags) | |
@staticmethod |