Skip to content

Instantly share code, notes, and snippets.

View emersonsoares's full-sized avatar
🎯
Focusing

Emerson Soares emersonsoares

🎯
Focusing
View GitHub Profile
{
"id": "13753377",
"date": "2017-06-29T23:57:56Z",
"value": 22550,
"shippingValue": 3150,
"channel": {
"id": "1",
"name": "ONLINE"
},
"campaign": {
# Note: This spec is defined in multiple files.
# All comments and formating were lost during the bundle process.
# Existing files formatting may be not preserved on save.
swagger: '2.0'
info:
title: Cart API
description: Lorem Ipsum Dolor Sit Amet
version: 1.0.0
host: api.grupo-ltm.com
schemes:
@emersonsoares
emersonsoares / curl-cors.sh
Created April 24, 2017 17:48
Debug CORS via CURL
curl -H "Origin: http://example.com" \ [14:30:07]
-H "Access-Control-Request-Method: GET" \
-H "Access-Control-Request-Headers: X-Requested-With" \
-X OPTIONS --verbose \
"http://localhost/api"
@emersonsoares
emersonsoares / Program.cs
Created March 7, 2017 21:25
Minimum configuration web api in AspNetCore
public static class Program
{
public static void Main(string[] args) => new WebHostBuilder()
.UseKestrel()
.UseUrls("http://localhost:5000")
.ConfigureServices(services => services.AddRouting())
.Configure(app =>
app.UseRouter(router =>
router.MapGet("hello",
async handler => await handler.Response.WriteAsync("Hello World!"))))
@emersonsoares
emersonsoares / delete-bin-obj.ps1
Created December 19, 2016 17:54
Delete all bin and obj folders from Solution directory
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { Remove-Item $_.fullname -Force -Recurse -Verbose } -Verbose
@emersonsoares
emersonsoares / find-processes-using-assembly.ps1
Created August 25, 2016 20:29
Quick way to determine which process is using some assembly/dll
tasklist /m MyAssembly.dll
@emersonsoares
emersonsoares / gist:a7d3b83174257e72152c058528fbf796
Created August 22, 2016 22:31
Get Assembly Qualified Name using Visual Studio External Tools
Open Visual Studio
Go to Tools –> External Tools –> Add
Title: Get Qualified Assembly Name
Command: Powershell.exe
Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"
Check "Use Output Window".
@emersonsoares
emersonsoares / stackoverflowsearch.md
Last active July 12, 2016 18:20
Configure Stack Overflow as a search engine on Google Chrome
POST https://apisandbox.cieloecommerce.cielo.com.br/1/sales HTTP/1.1
User-Agent: Fiddler
Content-Type: application/json
MerchantId: b7de7192-a397-4042-9523-fd1924f3aeac
MerchantKey: RWRQUNAINFDABDUOTMKIPUPAPIDJQJOXLWLHGTVI
RequestId: f3c2a64b-96a4-43b5-9afa-af31e23eb5e4
Host: apisandbox.cieloecommerce.cielo.com.br
Content-Length: 418
{
Verifying that +emersonsoares is my blockchain ID. https://onename.com/emersonsoares