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/python | |
import csv,os | |
count = 0 | |
os.chdir("work/airline_ontime") | |
files = os.popen("find . -name *.zip") | |
for f in files: | |
print f | |
file_name = f.split("/")[-1] |
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
--- | |
- hosts: office-dashboard-terminal | |
become: yes | |
tasks: | |
- name: Ensure displays are up during office hours | |
cron: | |
name="Activate display" | |
minute="0" | |
hour="8" | |
weekday="1-5" |
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
import ldap , sys | |
if len(sys.argv != 2) : | |
print "Usage: python disableuserinAD.py <username>" | |
sys.exit(1) | |
Server = "ldap://xxx.xxx.xxx.xxx" | |
DN = "cn=username,cn=user,dc=example,dc=com" # DN for [email protected] in order to authentication | |
Secret = "xxxxxxx" #password for username | |
#Previous username and password used to autenticate in AD. | |
Base = "ou=xxxx,dc=example,dc=com" |
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 python | |
# Copyright (c) 2009, David Buxton <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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
import os | |
pathtozmprov = "/opt/zimbra/bin/zmprov -l" | |
f = os.popen(pathtozmprov + ' gaa') #list all users in zimbra mail server | |
zmprovgaa= [] | |
zmprovgaa = f.readlines() | |
for i in zmprovgaa: | |
print i | |
os.system("/opt/zimbra/bin/zmprov adlm <groupname>@xxxxx.xxx.xx.xx " + i) #add a user to the group |
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 python | |
import ldap , sys | |
if len(sys.argv) != 2 : | |
pritn "Example of usage: python ADsearch.py <username>" | |
sys.exit(1) | |
username = sys.argv[1] | |
Server = "ldap://xxx.xxx.xxx.xxx" | |
DN = "cn=xxx,cn=xxx,dc=xxx,dc=xxx,dc=xxx,dc=" #a DN for the user using in auth process | |
Secret = "xxxxxx" | |
Base = "dc=xxxx,dc=xxx,dc=xxx,dc=xx" #The search domain level |
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/python | |
#this script check the databases created in the Mysql engine and not in the backup script. | |
import os , commands , sys | |
import smtplib | |
from email.MIMEText import MIMEText | |
from email.MIMEMultipart import MIMEMultipart | |
DBs=os.popen('grep ^"DBNAMES" /opt/scripts/automysqlbackup.sh | cut -d"=" -f2') #Get all DBs in backup scripts | |
DBs=DBs.readlines() | |
DBs=DBs[0][1:-2] |
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
import pymedia.audio.sound as sound | |
import pymedia.audio.acodec as acodec | |
import time | |
import sys | |
import wx | |
from threading import Thread | |
app = wx.App() | |
class frame(wx.Frame): |