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 python3 | |
"""Munin plugin to monitor naxsi rule hits | |
from https://gist.github.com/patroqueeet/ed48078de9b758cd35d92fa667894a84 | |
needs logtail command being installed | |
=head1 NAME |
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 | |
# print status | |
git status | |
locale | |
virtualenv .ve | |
VIRTUAL_ENV_DISABLE_PROMPT=true source .ve/bin/activate | |
# os pkgs | |
# sudo aptitude remove -y postgresql-9.4 postgresql-9.4-postgis-2.1 postgresql-9.4-postgis-2.2 postgresql-9.4-postgis-scripts postgresql-client-9.4 postgresql-client-common postgresql-common postgresql-contrib-9.4 postgresql-server-dev-9.4 |
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
In [11]: while True: | |
for t in Thumbnail.objects.all(): | |
fname = os.path.basename(t.name) | |
dname = os.path.dirname(t.name) | |
h.join(root, dname)):.isfile(os.path.join(root, dname, fname)) and os.path.exists(os.path | |
for x in listdir(os.path.join(root,dname)): | |
if x[3:] == os.path.basename(t.name): | |
e, x[3:]) print "renaming", os.path.join(root,dname,x), os.path.join(root,dname | |
)) os.rename(os.path.join(root,dname,x), os.path.join(root,dname, x[3:]) | |
time.sleep(3) |