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.Diagnostics; | |
| using System.Web; | |
| using ikvm.extensions; | |
| using javax.tools; | |
| using NHtmlUnit; | |
| using NHtmlUnit.Html; | |
| using WebClient = NHtmlUnit.WebClient; | |
| using NUnit.Framework; | |
| using Uber; |
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 System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Diagnostics; | |
| namespace GetParentProcess | |
| { | |
| class Program |
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
| package main | |
| import ( | |
| "github.com/gorilla/pat" | |
| "net/http" | |
| ) | |
| func main() { | |
| r := pat.New() |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <handlers> | |
| <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> | |
| </handlers> | |
| <httpPlatform processPath="d:\home\site\wwwroot\go\bin\go.exe" | |
| arguments="run d:\home\site\wwwroot\server.go" | |
| startupTimeLimit="60"> | |
| <environmentVariables> |
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
| // | |
| // POST: /Account/ExternalLoginConfirmation | |
| [HttpPost] | |
| [AllowAnonymous] | |
| [ValidateAntiForgeryToken] | |
| public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl) | |
| { | |
| if (User.Identity.IsAuthenticated) | |
| { | |
| return RedirectToAction("Manage"); |
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
| <?xml version="1.0" encoding="utf-16"?> | |
| <application xmlns="http://wadl.dev.java.net/2009/02" xmlns:siena="http://schemas.microsoft.com/MicrosoftProjectSiena/WADL/2014/11" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sienatool="http://www.todo.com" | |
| siena:serviceId="WadeAPIServiceWadl"> | |
| <grammars> | |
| <jsonTypes targetNamespace="http://www.todo.com" xmlns="http://schemas.microsoft.com/MicrosoftProjectSiena/WADL/2014/11"> | |
| <object name="GetAccounts_Root"> | |
| <property name="totalSize" type="number" /> | |
| <property name="done" type="boolean" /> | |
| <property name="records" typeRef="GetAccounts_records_Array" /> | |
| </object> |
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
| public class TokenValidationHandler : DelegatingHandler | |
| { | |
| private readonly string _storageConnectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); | |
| protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
| { | |
| const string errorMessage = "Unauthorized access; {0}"; | |
| const HttpStatusCode code = HttpStatusCode.Unauthorized; | |
| var authValue = request.Headers.Authorization; |
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
| import os | |
| import psycopg2 | |
| import urlparse | |
| import pika, logging | |
| urlparse.uses_netloc.append("postgres") | |
| url = urlparse.urlparse(os.environ["DATABASE_URL"]) | |
| logging.basicConfig() |
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
| import os | |
| import psycopg2 | |
| import urlparse | |
| urlparse.uses_netloc.append("postgres") | |
| url = urlparse.urlparse(os.environ["DATABASE_URL"]) | |
| conn = psycopg2.connect( | |
| database=url.path[1:], | |
| user=url.username, |
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
| import requests | |
| import base64 | |
| import json | |
| from simple_salesforce import Salesforce | |
| userName = '' | |
| password = '' | |
| securityToken = '' | |
| instance = '' |