This file contains 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
@triggers().outputs.body.Content |
This file contains 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
#SQLCMD -S SERVER\INSTANCE -E -i yourscript.sql -o output.txt | |
[string]$instance = $args[0] | |
[string]$scriptFile = $args[1] | |
[string]$outputFile = $args[2] | |
if ($instance -eq "") { | |
Write-Output "No SQL instance provided"; | |
return; | |
} | |
if ($scriptFile -eq "") { |
This file contains 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
{ | |
"fromEmail": "robert.mayer@afconsult.com", | |
"toEmail": "robert.mayer@afconsult.com", | |
"subject": "Email Test", | |
"message": "Hello World - email sent using Azure Function App, by Robert Mayer - consultant at ÅF", | |
"isImportant": true | |
} |
This file contains 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
bool isImportantEmail = false; | |
string fromEmail = "robert.mayer@afconsult.com"; | |
string toEmail = "robert.mayer@afconsult.com"; | |
int smtpPort = 587; | |
bool smtpEnableSsl = true; | |
string smtpHost = ""; | |
string smtpUser = ""; | |
string smtpPass = ""; | |
string subject = ""; | |
string message = ""; |
This file contains 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
/FunctionName01 | |
/function.json | |
/run.csx | |
/FunctionName02 | |
/function.json | |
/run.csx | |
/FunctionName03 | |
/function.json | |
/run.csx | |
/host.json |
This file contains 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
string connectionString = ConfigurationManager.AppSettings["StorageConnectionString"]; | |
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); | |
CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); | |
CloudTable table = tableClient.GetTableReference("AzureFunctionsLogTable"); | |
TableQuery<DynamicTableEntity> query = new TableQuery<DynamicTableEntity>(); | |
foreach (var t in table.ExecuteQuery(query)) |
This file contains 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
static void Main() | |
{ | |
System.ServiceProcess.ServiceBase[] ServicesToRun; | |
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() }; | |
System.ServiceProcess.ServiceBase.Run(ServicesToRun); | |
} |
This file contains 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
static void Main() | |
{ | |
#if (!DEBUG) | |
System.ServiceProcess.ServiceBase[] ServicesToRun; | |
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() }; | |
System.ServiceProcess.ServiceBase.Run(ServicesToRun); | |
#else | |
Service1 service = new Service1(); | |
service.Init(); | |
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); |
This file contains 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
{ | |
"data": [ | |
{ | |
"_self": "http://myapiurl/data/3", | |
"id": 3, | |
"name": "Test3", | |
"description": "Hello MA" | |
}, | |
{ | |
"_self": "http://myapiurl/data/4", |
This file contains 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
{ | |
"data": { | |
"_self": "http://myapiurl/data/1", | |
"id": 1, | |
"name": "Test", | |
"description": "Hello World" | |
} | |
} |