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
| Set-StrictMode -Version Latest | |
| # Constants | |
| if (!(Test-Path variable:\NET_FW_DISABLED)) { Set-Variable NET_FW_DISABLED -Option Constant $False } | |
| if (!(Test-Path variable:\NET_FW_ENABLED)) { Set-Variable NET_FW_ENABLED -Option Constant $True } | |
| if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_TCP)) { Set-Variable NET_FW_IP_PROTOCOL_TCP -Option Constant 6 } | |
| if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_UDP)) { Set-Variable NET_FW_IP_PROTOCOL_UDP -Option Constant 17 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_DOMAIN)) { Set-Variable NET_FW_PROFILE_DOMAIN -Option Constant 0x1 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_PRIVATE)) { Set-Variable NET_FW_PROFILE_PRIVATE -Option Constant 0x2 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_PUBLIC)) { Set-Variable NET_FW_PROFILE_PUBLIC -Option Constant 0x2 } |
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
| <# Take General Parameters from User #> | |
| param([string] $ServerName=(Read-Host -prompt "Please Enter Server Name"),[string] $UserName=(Read-Host -prompt "Please Enter Your User Name"),[string] $Password=(Read-Host -prompt "Please Enter Your Password")) | |
| function Job(){ | |
| cls | |
| #Local Firewall | |
| $fw = New-Object -ComObject hnetcfg.fwpolicy2 | |
| #Delete Existing Rules |
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
| 1)Generate SSL Certificate with one of these options | |
| -CA Authority(e.g:Versign) | |
| -Active Directory Certificate Services | |
| -Self Signed(Not to be used in Production) | |
| Code : cd 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\' | |
| makecert -r -pe -n "CN=3dmxvm-solar.cloudapp.net " -b 01/01/2012 -e 01/01/2022 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 | |
| 2) Export Certificate in .pfx format to store into Trusted Root Store of Client Machine | |
| 3) Enable WinRm Trusted Source IP addresses |
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
| Get-WmiObject Win32_Product | Sort-Object Name | Select Name,version,Vendor |export-csv myprogramlist.csv |
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
| 1) Go to path [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva] | |
| 2) There might be some junk characters in the Display name before the word "Cisco....". Delete them | |
| 3) the display name should read like "DisplayName"="Cisco AnyConnect VPN Virtual Miniport Adapter for Windows x64" |
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
| #List existing Hosts | |
| ls WSMan:\localhost\Client\TrustedHosts | |
| #Add new Host | |
| winrm set winrm/config/client '@{TrustedHosts="HostName"}' |
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
| # run on win computer / r version | |
| setwd("C:/Users/pavan/RLibrary/") # or any other existing temp directory | |
| packages <- installed.packages()[,"Package"] | |
| save(packages, file="Rpackages") | |
| # run on ubuntu computer / r version | |
| setwd("/RLibrary") # or any other existing temp directory | |
| load("Rpackages") | |
| for (p in setdiff(packages, installed.packages()[,"Package"])) |
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
| # Save file as ~/.ssh/config | |
| # Add permissions chmod 600 ~/.ssh/config | |
| # Optional permissions chmod $USER ~/.ssh/config | |
| ##default for all hosts## | |
| Host * | |
| ForwardAgent No | |
| ForwardX11 no | |
| Compression yes |
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
| """gunicorn WSGI server configuration.""" | |
| from multiprocessing import cpu_count | |
| from os import environ | |
| def max_workers(): | |
| return cpu_count() * 2 + 1 | |
| # Config Properties | |
| bind = '0.0.0.0:' + environ.get('PORT', '8080') | |
| max_requests = 1000 |
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
| #Install build libraries | |
| sudo apt-get install build-essential libssl-dev libgflags-dev libreadline-dev libsqlite3-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev | |
| #If using Python3.7 via Dead snakes PPA install python3.7-dev | |
| sudo apt-get install python3.7-dev | |
| #Clone repo | |
| git clone https://github.com/facebook/rocksdb.git | |
| #build locally (https://github.com/facebook/rocksdb/blob/master/INSTALL.md) |
OlderNewer