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
| _token.AccessToken = "GARBAGE"; // simulates the same behavior as expiration | |
| var refreshToken = false; | |
| do | |
| { | |
| if (refreshToken) | |
| { | |
| var auth = new AuthenticationClient(); | |
| await auth.TokenRefreshAsync(ConsumerKey, _token.RefreshToken); |
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 auth = new AuthenticationClient(); | |
| await auth.TokenRefreshAsync(ConsumerKey, _token.RefreshToken); |
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
| --- | |
| layout: nil | |
| --- | |
| #!/bin/bash | |
| {% for post in site.posts %}$(/usr/bin/open -a "/Applications/Google Chrome.app" 'https://developers.facebook.com/tools/debug/og/object?q=http://www.wadewegner.com{{ post.url }}') | |
| {% endfor %} |
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
| private const string AuthorizationEndpointUrl = | |
| "https://login.salesforce.com/services/oauth2/authorize"; | |
| private const string ConsumerKey = "YOURCONSUMERKEY"; | |
| private const string CallbackUrl = "sfdc://success"; | |
| async private void Page_Loaded(object sender, RoutedEventArgs e) | |
| { | |
| var startUrl = Common.FormatAuthUrl(AuthorizationEndpointUrl, ResponseTypes.Token, ConsumerKey, | |
| WebUtility.UrlEncode(CallbackUrl), DisplayTypes.Popup); | |
| var startUri = new Uri(startUrl); |
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
| class AssociationUriMapper : UriMapperBase | |
| { | |
| public override Uri MapUri(Uri uri) | |
| { | |
| var tempUri = System.Net.HttpUtility.UrlDecode(uri.ToString()); | |
| if (tempUri.Contains("sfdc://success")) | |
| { | |
| var querystring = tempUri.Substring(tempUri.IndexOf("#") + 1); | |
| var split = querystring.Split('&'); |
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
| local secretKey = "YOUR_SECRET_KEY" | |
| local data = { | |
| client_id = "YOUR_CONSUMER_KEY", | |
| client_secret = "YOUR_CONSUMER_SECRET", | |
| grant_type = "password", | |
| username = "YOUR_LOGIN", | |
| password = "YOUR_PASSWORD" .. secretKey | |
| } |
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 | |
| consumer_key = "YOUR_CONSUMER_KEY" | |
| consumer_secret = "YOUR_CUSTOMER_SECRET" | |
| username = "YOUR_USER_NAME" | |
| password = "YOUR_PASSWORD" | |
| payload = { | |
| 'grant_type': 'password', | |
| 'client_id': consumer_key, |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\QueryBuilder] |
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
| $imgname = 'WS2012-WebFarmImage' | |
| $cloudsvc = 'DemoWebFarm' | |
| $pass = 'Password' | |
| $subscriptionName = 'Windows Azure MSDN - Visual Studio Ultimate' | |
| $storageAccount = 'portalvhds9dvbvvff5hdg3' | |
| $location = 'East US' | |
| Set-AzureSubscription -SubscriptionName $subscriptionName -CurrentStorageAccount $storageAccount | |
| $iisvm1 = New-AzureVMConfig -Name 'iis1' -InstanceSize Small -ImageName $imgname | |
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 parameters = new Dictionary<string, object> { { "message", "Hello!" } }; | |
| await ParseCloud.CallFunctionAsync<IDictionary<string, object>>("sendsms", parameters); |