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
require 'net/http' | |
require 'uri' | |
def downloadFile(filePath, url,username, password) | |
uri = URI(URI.encode(url)) | |
Net::HTTP.start(uri.host,uri.port) do |http| | |
request = Net::HTTP::Get.new uri.path | |
request.basic_auth username,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
#!/bin/bash -e | |
IFADDR="192.168.3.1/24" | |
if [[ ! ip link show docker0 ]]; then | |
ip link add docker0 type bridge | |
ip addr add "$IFADDR" dev docker0 | |
ip link set docker0 up | |
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE | |
fi |
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
if ! grep -q 'test.com' /etc/resolv.conf | |
then | |
sed -i "s/`grep search /etc/resolv.conf`/`grep search /etc/resolv.conf` test.com/" /etc/resolv.conf | |
fi |
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
mkdir ~/tdv-core | |
cd ~/tdv-core | |
#clone all repos | |
git clone [email protected]:tdigital-ondemand/tdv-core.git | |
#Clone parent firstly | |
git clone [email protected]:tdigital-ondemand/parent.git | |
cd parent | |
git checkout dev |
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
SecRule REQUEST_URI "/getonly" "chain,log,deny,status:403,phase:2,id:1234567010" | |
SecRule REQUEST_METHOD "!@rx ^(?:GET)$" |
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
find . -name '*[A-Z]*' -print0 | xargs -0 rename 'y/A-Z/a-z/' |
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
REM Check certificates | |
certutil -store MY | |
REM Import cert | |
certutil -p PASSWORD -ImportPFX CERT_PATH | |
REM Check winrm listners | |
winrm e winrm/config/listener | |
REM delete if it exists |
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
cmd.exe /C del C:\chef\validation.pem | |
cmd.exe /C del C:\chef\client.rb | |
cmd.exe /C del C:\chef\client.pem | |
> C:\chef\validation.pem ( | |
<%= validation_key %> | |
) | |
> C:\chef\client.rb ( |
NewerOlder