git init
git remote add origin [email protected]:something/something.git
git pull origin master
git config --add remote.origin.push 'refs/tags/:refs/tags/'
#!/bin/sh | |
liquibase --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://localhost/db --username=root --changeLogFile=changelog.xml $@ |
git init
git remote add origin [email protected]:something/something.git
git pull origin master
git config --add remote.origin.push 'refs/tags/:refs/tags/'
def timeout(seconds=5, error_type=None, error_message=None): | |
""" | |
Attaches a timeout to the deferred returned by the wrapped function. | |
After timeout seconds the deferred is canceled and an exception raised. | |
""" | |
def attach_timeout(method): | |
@functools.wraps(method) | |
def wrapper(self, *args, **kwargs): | |
d = method(self, *args, **kwargs) | |
def on_timeout(): |
def sleep(secs): | |
d = Deferred() | |
reactor.callLater(secs, d.callback, None) | |
return d |
def wrap_exception(handle, error_type, error_message, log=None): | |
def attach_check(method): | |
@functools.wraps(method) | |
def wrapper(self, *args, **kwargs): | |
d = method(self, *args, **kwargs) | |
def on_error(failure): | |
failure.trap(handle) | |
logger = logging if not log else logging.getLogger(log) | |
logger.error("%s, %s" % (error_message, failure.getErrorMessage())) | |
raise error_type(error_message) |
def time_method(stat_name): | |
""" | |
Attaches a timeout to the deferred returned by the wrapped function. | |
After timeout seconds the deferred is canceled and an exception raised. | |
""" | |
def attach_timing(method): | |
@functools.wraps(method) | |
def wrapper(self, *args, **kwargs): | |
start = time() |
def cache(lifetime=None, cache_size=0): | |
""" Caching decorator. """ | |
def attach_caching(method): | |
method._cache = pylru.lrucache(cache_size) if cache_size else {} | |
method._cache_updated = {} | |
@functools.wraps(method) | |
def wrapper(*args, **kw): | |
# frozenset is used to ensure hashability | |
key = args, frozenset(kw.iteritems()) if kw else args |
#!/bin/bash | |
launchctl setenv KEY value |
# Reject traffic out to a specific IP | |
iptables -o eth0 -I OUTPUT -d 10.207.47.148 -j REJECT |
body { font: normal x-small verdana !important; } | |
.link { margin-bottom: 4px !important; } | |
.link .title { font: normal 10pt verdana !important; } | |
.link .flat-list { padding: 0px !important; } | |
.tagline { font: normal 7pt verdana !important; display:none !important; } | |
.link .rank { display: none; } | |
.sitetable { padding: 10px !important; margin-top: 30px !important; margin-left: 100px !important; margin-right: 100px !important; background-color: #F6F6EF } | |
.side { display: none; } | |
a:link { color: black !important; text-decoration: none !important;} | |
a:visited {color: #828282 !important;} |