Post on twitter/kwippy using .NET

March 3rd, 2009 § 4 comments § permalink

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

using System.Net;

using System.Web;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

System.Net.ServicePointManager.Expect100Continue = false;

Uri address = new Uri(http://twitter.com/statuses/update.json);

// Create the web request

HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;

request.Method = “POST”;

request.ContentType = “application/x-www-form-urlencoded”;

request.Credentials = new NetworkCredential(“username”, “password”);

StringBuilder data = new StringBuilder();

data.Append(“status=from%20.net”);

// Create a byte array of the data we want to send

byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());

// Set the content length in the request headers

request.ContentLength = byteData.Length;

using (Stream postStream = request.GetRequestStream())

{

postStream.Write(byteData, 0, byteData.Length);

}

using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)

{

// Get the response stream

StreamReader reader = new StreamReader(response.GetResponseStream());

// Console application output

Console.WriteLine(reader.ReadToEnd());

}

}

}

}

Code to post on twitter and kwippy using this simple C# program :) . Njoi.

Kwippy feed for wordpress

January 27th, 2009 § 0 comments § permalink

If you notice i now have a RSS feed for kwippy on the sidebar. That is done by using RSS widget functionality within the wordpress theme section. The image below outline the complete setup which i use for my blog.

Its really simple to set this up :) .Enjoy.

Twitter feed wall – great for projectors

January 21st, 2009 § 3 comments § permalink

Inspired by http://twistori.com/. I wrote a generic tool which will allow people to setup a simple wall where people can post and it will automatically refresh. I built this tool specifically because it was needed at proto.in. I am very sure it will be useful to a lot of people out there.

Uses JQuery and a Queues for javascript library. Maybe someone can do some transition magic with it, i am still a javascript n00b :) .

Here is the complete source code and demo. Please forgive the lack of documentation.

First wordpress plugin : Kwippy poster 1.0

January 19th, 2009 § 4 comments § permalink

Just created my first wordpress plugin, from concept to implementation in 3 hours :D . This plugin basically posts an update on kwippy when you publish a new blog post. This can be a good tutorial for someone trying to build their own plugins actually. Enjoy.

Updated:
Official WordPress plugin page :
http://snipper.in/86

The Screen Savers! – NES PC

January 19th, 2009 § 0 comments § permalink

Very cool … though i seem to be nearly 4 years late.