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
| # to be able to import ldap run pip install python-ldap | |
| import ldap | |
| if __name__ == "__main__": | |
| ldap_server="x.x.x.x" | |
| username = "someuser" | |
| password= "somepassword" | |
| # the following is the user_dn format provided by the ldap server | |
| user_dn = "uid="+username+",ou=someou,dc=somedc,dc=local" |
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
| #!/usr/bin/env bash | |
| # SOURCE: https://gist.github.com/konstantinbo/d21dfa5c7a0edbaec8244f97eb177209 | |
| # Uninstall unnecessary programs | |
| # sudo apt-get purge epiphany-browser epiphany-browser-data #browser | |
| # sudo apt-get purge pantheon-mail | |
| # Update your system (clear apt cache/locks first) |
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 clicking "Allow" in System Preferences "Security & Privacy" screen | |
| # when you're on Screen Sharing. Otherwise it doesn't work. | |
| # To fix: | |
| # - Put "Security & Privacy" window in the top left screen | |
| # - open a Terminal on a side | |
| # - save click.oscript | |
| # - Run: osascript click.oscript | |
| # | |
| # The mouse click you send should hit "Allow" button. You may need to move the window a little bit. | |
| # Script originally from: https://discussions.apple.com/thread/3708948 |
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
| # SOURCE: @zhouyanlt https://gist.github.com/yevrah/21cdccc1dc65efd2a4712781815159fb#gistcomment-2695800 | |
| sudo yum install -y gcc git ncurses-devel | |
| git clone https://github.com/vim/vim.git ~/vim | |
| cd ~/vim/src | |
| make distclean # if you built Vim before | |
| make -j8 | |
| sudo make install | |
| cp -ru ~/vim/src/vim /usr/bin # overwrites /usr/bin/vim w/o confirmation |
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
| #!/usr/bin/env bash | |
| # kill previous yum operations | |
| if [[ $(pgrep yum) != '' ]]; then | |
| pgrep yum | xargs sudo kill -9 | |
| rm -f /var/run/yum.pid | |
| rm -rf /var/tmp/* | |
| rm -rf /var/cache/yum/* | |
| rpm --rebuilddb | |
| yum clean --noplugins all |
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
| #!/usr/bin/env bash | |
| 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 |
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
| #!/usr/bin/env bash | |
| set -e | |
| # # Mac OS X 10.7/10.8/10.9/10.10 Bootstrapping | |
| # | |
| # ## Pre-requisites | |
| # | |
| # 1. Set your hostname: In **System Preferences** go to **Sharing** and enter | |
| # the name in **Computer Name** | |
| # 2. Run **Software Update** and reboot if necessary |
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
| <# | |
| .SYNOPSIS | |
| Resets the requried components of the Windows Update Agent. | |
| .DESCRIPTION | |
| Stops required services. | |
| Removes cached files/folders used by the Windows Update Agent. | |
| Resets the permissions on the bits and wuauserv services. | |
| Registers dlls needed by the bits/Windows Update Agent. | |
| Removes lingering registry entries from SUS if present. | |
| Restarts all the services that where stopped. |
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
| #!/usr/bin/env bash | |
| # SOURCE: https://eligiblestore.com/blog/2017/05/02/how-to-install-mosh-on-centos/ | |
| # ensure running as root | |
| if [[ "$(id -u)" != "0" ]]; then | |
| exec sudo "$0" "$@" | |
| fi | |
| # install mosh | |
| yum install -y epel-release |
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
| $image = “D:\Windows\System32\DriverStore\FileRepository” # may just need mounted Windows root dir (e.g., "D:\") | |
| $dism = dism /image:$image /get-drivers | |
| ForEach($line in $dism){ | |
| If($line -like “Published Name*”){ | |
| $sp = ($line -split “ “) | |
| $oem = $sp[3] | |
| Dism /image:$image /Remove-Driver /Driver:$oem # /Recurse | |
| } | |
| } |