Skip to content

Instantly share code, notes, and snippets.

@joaomoreno
joaomoreno / settings.json
Created January 8, 2018 20:31
VS Code Settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Fira Code iScript",
"editor.fontSize": 14,
"editor.lineHeight": 21,
"workbench.settings.openDefaultSettings": false,
"terminal.integrated.fontSize": 13,
"editor.tabSize": 2,
"editor.insertSpaces": false,
"files.trimTrailingWhitespace": true,

Keybase proof

I hereby claim:

  • I am joaomoreno on github.
  • I am joaomoreno (https://keybase.io/joaomoreno) on keybase.
  • I have a public key whose fingerprint is C15C 1B76 4693 B7A7 0D7C 1FFB FCFB 366E 4FD6 AA73

To claim this, I am signing this object:

Process: Electron [44697]
Path: /Volumes/VOLUME/*/Visual Studio Code - Insiders 3.app/Contents/MacOS/Electron
Identifier: com.microsoft.VSCodeInsiders
Version: 1.15.0-insider (1.15.0-insider)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Electron [44697]
User ID: 501
Date/Time: 2017-07-26 09:41:10.141 +0200
@joaomoreno
joaomoreno / gist:960b4f643b2ff09bcdf7
Created January 6, 2016 09:16
VSCode Stack Overflow
Please ask 'how-to' questions about VS Code on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode) using
the tag `vscode`.
The VS Code development team together with the VS Code Community will answer question your question over there.
Here is how the development team tracks feedback on the different channels: [Feedback Channels](https://github.com/Microsoft/vscode/wiki/Feedback-Channels).
@joaomoreno
joaomoreno / Startup.cs
Created February 23, 2015 14:03
ASP .NET vNext WebApplication
using Microsoft.AspNet.Builder;
namespace KWebStartup
{
public class Startup
{
public void Configure(IApplicationBuilder app)
{
app.UseStaticFiles();
app.UseWelcomePage();
public void Ping(string authorizationCode) {
var client = new WebClient { BaseAddress = string.Format("ACS_URL") };
var values = new NameValueCollection
{
{"code", authorizationCode},
{"grant_type", "authorization_code"},
{"redirect_uri", "REDIRECT_URI"},
{"client_id", "SERVICE_USERNAME"},
{"client_secret", "SERVICE_USERKEY"},
public string CreateAuthorizationCode() {
var service = new ManagementService("SERVICE_NAMESPACE", "SERVICE_USERNAME", "SERVICE_USERKEY");
var delegation = service.CreateOAuth2Delegation("SERVICE_IDENTITY_NAME", "RELYING_PARTY_NAME", "USERNAME", "IDENTITY_PROVIDER");
return delegation.AuthorizationCode;
}
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using AcsOAuth2;
namespace MyApp
{
public class MvcApplication : System.Web.HttpApplication
using AcsOAuth2;
namespace ConsoleApplication1
{
internal class Program
{
private static void Main(string[] args) {
var client = new ManagementService("SERVICE_NAMESPACE", "SERVICE_USERNAME", "SERVICE_USERKEY");
client.UpdateIdentityRedirectAddress("Google", "http://myapp/");
}
@joaomoreno
joaomoreno / index.html
Created April 22, 2013 13:49
Firebug caching issue
<html>
<body>
<div id="result"></div>
<script>
var div = document.getElementById('result');
var req = new XMLHttpRequest();
req.onload = function () {
var req2 = new XMLHttpRequest();
req2.onload = function () {