Skip to content

Instantly share code, notes, and snippets.

Rickard Pettersson RickardPettersson

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am rickardpettersson on github.
  • I am rickardp (https://keybase.io/rickardp) on keybase.
  • I have a public key ASCUrFDW-vl8VIDr9UYT3drih_9HVA5KFqjdRBVnP-JxsAo

To claim this, I am signing this object:

@RickardPettersson
RickardPettersson / gist:c95f78402d2d59552732
Last active Oct 24, 2018
C# hjälp class för Swish API för e-handel, fungerande
View gist:c95f78402d2d59552732
using System;
using System.IO;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Web;
namespace WebShop.Helpers
{
public class SwishAPIHelper
View gist:6242726
-- Metadata
meta.id = "Unified.TellStick"
meta.name = "TellStick"
meta.author = "Unified Intents"
meta.description = "TellStick remote"
--Device methods
local TELLSTICK_TURNON = 1
local TELLSTICK_TURNOFF = 2
@RickardPettersson
RickardPettersson / gist:1247081
Created Sep 28, 2011
Trafikverket Exponerar API (test kod i .Net (C#))
View gist:1247081
HttpWebRequest req = null;
HttpWebResponse rsp = null;
try
{
string uri = "http://www.trafikverket.se/Trafikverket/Orion/OrionProxy.ashx";
req = (HttpWebRequest)HttpWebRequest.Create(uri);
req.Method = "POST"; // Post method
req.ContentType = "text/xml; encoding='utf-8'"; // content type
You can’t perform that action at this time.