Skip to content

Instantly share code, notes, and snippets.

View redbull05689's full-sized avatar
🎯
Focusing

Maxim Vasilev redbull05689

🎯
Focusing
View GitHub Profile
function Upload-FileToWebApp($resourceGroupName, $webAppName, $slotName = "", $localPath, $kuduPath){
$kuduApiAuthorisationToken = Get-KuduApiAuthorisationHeaderValue $resourceGroupName $webAppName $slotName
if ($slotName -eq ""){
$kuduApiUrl = "https://$webAppName.scm.azurewebsites.net/api/vfs/site/wwwroot/$kuduPath"
}
else{
$kuduApiUrl = "https://$webAppName`-$slotName.scm.azurewebsites.net/api/vfs/site/wwwroot/$kuduPath"
}
$virtualPath = $kuduApiUrl.Replace(".scm.azurewebsites.", ".azurewebsites.").Replace("/api/vfs/site/wwwroot", "")
@dkittell
dkittell / FTP-UploadDirectory.ps1
Created November 24, 2015 18:13
PowerShell – FTP Upload Directory With Sub-Directories
clear
# FTP Server Variables
$FTPHost = 'ftp://192.168.1.1/html/'
$FTPUser = 'user'
$FTPPass = 'password'
#Directory where to find pictures to upload
$UploadFolder = "C:\Temp\"
@husnilk
husnilk / webdownloader.sh
Last active January 16, 2019 06:24
Command for downloading website via wget The options are: --recursive: download the entire Web site. --domains website.org: don't follow links outside website.org. --no-parent: don't follow links outside the directory tutorials/html/. --page-requisites: get all the elements that compose the page (images, CSS and so on). --html-extension: save fi…
$wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains [domain.org] \
--no-parent \
[http://domain.org/target/url/]