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
| def changePassword(user_dn, old_password, new_password): | |
| ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) | |
| l = ldap.initialize("LDAPS://DOMAIN.COM") | |
| l.set_option(ldap.OPT_REFERRALS,0) | |
| l.set_option(ldap.OPT_PROTOCOL_VERSION,3) | |
| l.set_option(ldap.OPT_X_TLS,ldap.OPT_X_TLS_DEMAND) | |
| l.set_option(ldap.OPT_X_TLS_DEMAND,True) | |
| l.set_option(ldap.OPT_DEBUG_LEVEL,255) | |
| l.simple_bind_s("ACCOUNTWITHRIGHTS@DOMAIN.COM", "PASSWORD") |
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
| chef-server-ctl stop | |
| chef-server-ctl kill | |
| chef-server-ctl cleanse | |
| chef-server-ctl uninstall | |
| pkill -9 -u opscode | |
| pkill -9 -f postgres | |
| pkill -9 -f beam | |
| pkill -9 -f /opt/chef | |
| rm -rf /etc/opscode /etc/chef /opt/opscode /opt/chef /var/chef | |
| rm -rf /etc/chef-server /etc/chef /opt/chef-server /opt/chef /root/.chef /var/opt/chef-server |
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
| FROM ubuntu:14.04 | |
| # Set the locale | |
| RUN locale-gen en_US.UTF-8 | |
| ENV LANG en_US.UTF-8 | |
| ENV LANGUAGE en_US:en | |
| ENV LC_ALL en_US.UTF-8 | |
| # Install dependencies | |
| RUN apt-get install -y python-dev python-pip python-lxml python-ldap \ |
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 | |
| # Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
| # Install stuff # | |
| ################# | |
| # Install development tools and some misc. necessary packages | |
| yum -y groupinstall "Development tools" | |
| yum -y install zlib-devel # gen'l reqs |
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
| # | |
| # UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
| # just run "sudo trimforce enable" to activate the trim support from now on! | |
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
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
| ################################################################### | |
| # (C)opyright 2012, Kameron Kenny, ExactTarget | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Put this file in .chef/plugins/knife/ |
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
| --- | |
| #### | |
| #### THIS IS OLD AND OUTDATED | |
| #### LIKE, ANSIBLE 1.0 OLD. | |
| #### | |
| #### PROBABLY HIT UP https://docs.ansible.com MY DUDES | |
| #### | |
| #### IF IT BREAKS I'M JUST SOME GUY WITH | |
| #### A DOG, OK, SORRY | |
| #### |
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/env python | |
| '''This is a script which runs an MTR (matt's traceroute) | |
| against a target hosts - meant to be triggered by a | |
| smokeping alert. Output is emailed and saved to log.''' | |
| import argparse, datetime, subprocess, smtplib | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText |