This file contains hidden or 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
#https://www.codementor.io/@sheena/advanced-use-python-decorators-class-function-du107nxsv | |
def time_all_class_methods(Cls): | |
class NewCls(object): | |
def __init__(self,*args,**kwargs): | |
self.oInstance = Cls(*args,**kwargs) | |
def __getattribute__(self,s): | |
""" | |
this is called whenever any attribute of a NewCls object is accessed. This function first tries to | |
get the attribute off NewCls. If it fails then it tries to fetch the attribute from self.oInstance (an | |
instance of the decorated class). If it manages to fetch the attribute from self.oInstance, and |
This file contains hidden or 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
#https://www.codementor.io/@sheena/advanced-use-python-decorators-class-function-du107nxsv | |
def time_all_class_methods(Cls): | |
class NewCls(object): | |
def __init__(self,*args,**kwargs): | |
self.oInstance = Cls(*args,**kwargs) | |
def __getattribute__(self,s): | |
""" | |
this is called whenever any attribute of a NewCls object is accessed. This function first tries to | |
get the attribute off NewCls. If it fails then it tries to fetch the attribute from self.oInstance (an | |
instance of the decorated class). If it manages to fetch the attribute from self.oInstance, and |
This file contains hidden or 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 | |
# === INFO === | |
# NoVPN | |
# Description: Bypass VPN tunnel for applications run through this tool. | |
VERSION="1.0.2" | |
# Author: KrisWebDev | |
# Requirements: Linux with kernel > 2.6.4 (released in 2008). | |
# Only tested on Ubuntu 15 with bash. | |
# Main dependencies are automatically installed. |
This file contains hidden or 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 | |
# === INFO === | |
# ForceVPN | |
# Description: Force VPN tunnel for specific applications. | |
# If the VPN is down => block the app network traffic. | |
# Better than a killswitch. IPv4. | |
VERSION="2.1.0" | |
# Author: KrisWebDev | |
# Requirements: Linux with kernel > 2.6.4 (released in 2008). |