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
| #r "Microsoft.Azure.WebJobs.Extensions.SendGrid" | |
| using SendGrid.Helpers.Mail; | |
| public static void run(out Mail message) | |
| { | |
| // see the associted function.json & projcet.json files for how to get this working. | |
| // function.json: https://gist.github.com/sjwaight/1394817ab84f8b6688a11be8621364fb | |
| // project.json: https://gist.github.com/sjwaight/0c2392236b56ef914f0b4b10b786a8fb | |
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
| var brainTreeResponse = gateway.Transaction.Sale(btRequest); | |
| Transaction transaction = null; | |
| if (brainTreeResponse.IsSuccess()) | |
| { | |
| transaction = brainTreeResponse.Target; | |
| } | |
| else | |
| { |
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
| using Microsoft.ServiceBus.Messaging; | |
| using Microsoft.ServiceBus; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| public static void Run(BrokeredMessage sbQueueItem, TraceWriter log) | |
| { | |
| var yourRecord = sbQueueItem.GetBody<string>(); | |
| var paymenRequest = JObject.Parse(yourRecord); | |
| var vendorId = paymenRequest.SelectToken("vendorId").ToString(); |
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
| { | |
| "frameworks": { | |
| "net46": { | |
| "dependencies": { | |
| "Braintree": "3.4.0", | |
| } | |
| } | |
| } | |
| } |
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
| using System; | |
| using Braintree; | |
| public static void Run(string input, TraceWriter log) | |
| { | |
| var braintreeEnvironment = "sandbox"; // alternative = production | |
| // These three config items should be stored in Azure KeyVault | |
| var merchantId = "5xxxxxxxxxxxxxx7"; | |
| var merchPubKey = "tyyyyyyyyyyyyyyh"; |
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
| <configuration> | |
| <appSettings> | |
| <add key="webpages:Version" value="3.0.0.0" /> | |
| <add key="webpages:Enabled" value="false" /> | |
| <add key="ClientValidationEnabled" value="true" /> | |
| <add key="UnobtrusiveJavaScriptEnabled" value="true" /> | |
| <add key="LoggingDatabaseAccount" value="__docdburi__" /> | |
| <add key="LoggingDatabaseKey" value="__docdbkey__" /> | |
| <add key="LoggingDatabase" value="__loggingdb__" /> | |
| <add key="LoggingDatabaseCollection" value="__loggingdbcollection__" /> |
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
| <parameters> | |
| <parameter name="IIS Web Application Name" description="IIS Web Application Name" defaultvalue="__iisappname__"> | |
| <parameterentry kind="ProviderPath" scope="IiSApp" match="@defaultvalue"/> | |
| </parameter> | |
| <parameter name="LoggingDatabaseAccount" description="Main Document DB Account" defaultvalue="__docdburi__"> | |
| <parameterentry kind="XmlFile" scope="\\Web.config$" match="/configuration/appSettings/add[@key='LoggingDatabaseAccount']/@value"/> | |
| </parameter> | |
| <parameter name="LoggingDatabaseKey" description="Key to access Main Document DB Account" defaultvalue="__docdbkey__"> | |
| <parameterentry kind="XmlFile" scope="\\Web.config$" match="/configuration/appSettings/add[@key='LoggingDatabaseKey']/@value"/> | |
| </parameter> |
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
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True)] | |
| [string]$resourceGroupName, | |
| [Parameter(Mandatory=$True)] | |
| [string]$networkSecurityGroupName, | |
| [Parameter(Mandatory=$True)] | |
| [string]$securityRuleName, | |
| [Parameter(Mandatory=$True)] | |
| [string]$allowOrDeny, |
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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: gabdemo | |
| spec: | |
| ports: | |
| - port: 80 | |
| selector: | |
| app: gabdemo | |
| type: LoadBalancer |
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/sh | |
| azuresub=$1 | |
| demolocation=$2 | |
| demoresourcegroup=$3 | |
| mysqlservername=$4 | |
| mysqladminuser=$5 | |
| mysqladminpass=$6 | |
| # uncomment to add local support and login to your Azure subscription |