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
""" | |
To Test this Script the start 8 memcache servers using this command. | |
$ memcached -d -p {PortNumber} | |
PortNumber: | |
11211 | |
11212 | |
11213 | |
11214 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
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
# Python virtual env alias | |
alias activate='test -d ENV && source ./ENV/bin/activate || echo "No Virtualenv in the current folder"' | |
alias mkenv='test -d ENV && echo "Already exists" || virtualenv --system-site-packages ENV; activate' |
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 -e | |
#======================================= | |
# | |
# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status} | |
# | |
# :Configuration file: /etc/default/celeryd | |
# | |
# To configure celeryd you probably need to tell it where to chdir. | |
# | |
# EXAMPLE CONFIGURATION |
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
""" | |
Intercept class attributes, and more aboute the discriptors. | |
Discriptors - Assign a class object to an attribute of another class. | |
""" | |
class MetaClass(type): | |
#This attribute interceptor works when we call the class attributes. | |
def __getattribute__(self,attr): | |
print 'Inside Metaclass - class of a class : ' | |
print "class: {}, attribute: {}".format(self,attr) |
NewerOlder