Skip to content

Instantly share code, notes, and snippets.


ABHAY DHAR abhaydhar

  • bengaluru
View GitHub Profile
View Ajax bind ajax:complete event
$("#myform").bind('ajax:complete', function() {
//Do Something
abhaydhar / DeployKudu
Created Oct 7, 2019
Powershell Script to deploy Dotnet and Unicorn Files to Azure App Service using Kudu Rest API
View DeployKudu
# User name from WebDeploy Publish Profile.
$userName = "`$" #Use backtick while assigning variable content
# Password from WebDeploy Publish Profile
$password = "password"
# Encode username and password to base64 string
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $userName, $password)))
$envName = "" #Replace from publish settings
abhaydhar / FileRenameExtensionMethod
Created Mar 5, 2018
Extension Method to Rename a file in a directory
View FileRenameExtensionMethod
public static class ExtensionMethod
public static void Rename(this FileInfo fileInfo, string newName)
fileInfo.MoveTo(fileInfo.Directory.FullName + "\\" + newName + fileInfo.Extension);
FileInfo file = new FileInfo("Complete_Directory_path_of_file");
file.Rename(fName.Replace('/', '-'));