Skip to content

Instantly share code, notes, and snippets.

View thehoneymad's full-sized avatar
🎯
Focusing

Swagata Prateek thehoneymad

🎯
Focusing
  • AWS
  • Vancouver
  • 07:55 (UTC -07:00)
View GitHub Profile
@thehoneymad
thehoneymad / HttpClientSample.cs
Created September 11, 2016 13:41
HttpClient Sample on posting data.
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
public class Program
{
public static void Main()
{
var task = Login();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace StackOverflow
{
public interface A { };
@thehoneymad
thehoneymad / Program.cs
Created June 5, 2016 10:07
GreedyKnapsackTest.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace GreedyKnapsack
{
class Program
{
static void Main(string[] args)
{
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text">:bbD</title>
<link rel="self" type="application/atom+xml;type=entry" href="http://localhost:8177/dataelements/6970" />
<link rel="alternate" type="application/vnd.vizrt.payload+xml" href="http://localhost:8177/dataelements/6970/payload" />
<link rel="template" type="application/atom+xml;type=entry" href="http://localhost:8177/templates/13781" />
<link rel="thumbnailfeed" type="application/atom+xml;type=feed" href="http://localhost:8177/dataelements/6970/thumbnails" />
<content type="application/vnd.vizrt.payload+xml">
<payload model="http://localhost:8177/templates/13781/model" xmlns="http://www.vizrt.com/types">
<field name="-concept-variant-choice">
@thehoneymad
thehoneymad / sample_request.py
Created May 18, 2016 05:24
Sample request towards thor for VTS report submission
import requests
import json
url = 'http://thor.gobd.co/vts/ping'
payload = {
'provider' : 'finder',
'data' : [
{
'status' : 'A',
'number' : '123456',
@thehoneymad
thehoneymad / SecureCallAttribute.cs
Created August 14, 2015 10:28
Custom Authorization Attribute on Asp.net web api 2.2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http.Controllers;
using System.Web.Http;