Friday, November 30, 2012



//You'll have to add the necessary imports

private var _video:Video; //Our video object

_video = new Video(640, 480);

private var _netConnection:NetConnection = new NetConnection();

private var _ns:NetStream = new NetStream(_netConnection);



_ns.client = new NetStreamUserClient(_ns);
var streamPath:String = "";;

//Handle our NetStatusEvent
private function handleNetStatusPlay(e:NetStatusEvent):void

 if ( == "error")
  if ( == "NetStream.Play.StreamNotFound")
   trace("FLV file does not exist!");

Code for NetStreamUserClient
  * ...
  * @author Rajesh Peter Douglas D'Monte
 public class NetStreamUserClient
  public function NetStreamUserClient()
  public function onCuePoint(infoObject:Object):void
   trace("onCuePoint" + infoObject);
  public function onMetaData(infoObject:Object):void
   trace("onMetaData " + infoObject);
  public function onPlayStatus(infoObject:Object):void
   trace("onPlayStatus " + infoObject);
   if (infoObject.code == "NetStream.Play.Complete")
    //FLV finished playing

Thursday, November 29, 2012

Super user (su) on Ubuntu Linux







$ sudo su


Note: This method still doesn't set super user's password.
Zoit: I am a n00b at Linux.

The 7 Deadly Sins & A Successful Website

I read this a while back from somewhere I can't quite remember but maybe I thought of it on my own. Whichever way you look at it, this is probably insightful for those of you who are looking at starting a successful website or business. Yes this applies to businesses as well.

Q1: When can you say your business is successful?

A1: When it makes the monies.

Q2: How do you get there?
A2: You address a need

Q3: WTF, but them peoples all got food, clothing and shelter (I guess you are targeting the part of the human population that ACTUALLY has the monies to spend) So what need do I need to address?
A3: If you are creative and intelligent you can address a need like the way Edison (God rest his soul) built the light bulb. So go find some part of human life that can be made better and you could get a successful business running mehn!

Q4: Blah, I'm dumb. My middle name is stupid and my last name is sloth what now?
A4: Prey on any of the 7 deadly sins (Sounding as cliche as possible my brotha')

Blah blah blah.. yeah so..

Look at all the successful sites around you, most of them if not all prey on three or more of the 7 deadly sins.
Examples include Facebook, MySpace etc

Facebook is fueled by envy and pride among other deadly sins. I'm not dissing the site, it also has a lot of nice nice merits like keeping people connected and shit like that but hey, most of the *h*** you k*** that use it go on th*** and get h****** on for obvious reasons. (I've censored some of this koohawky 'cause I didn't want to s***d s*****)

Oh and here's a list of the 7 deadly sins for those of us that didn't attend Sunday Catechism class.
Lust, gluttony, pride, envy, greed, sloth and wrath.

Have at it:

So you want to make the monies? Want to get kazillions of hits a day on your all so awesome website? Go prey on your friends worst. Would I do this? Maybe. I don't really know, I don't really go out of my way and ask myself, How can I make my project prey on my friends worst? I just build what I find fun to build.

That's all.


ZOIT: What I told my friend when I wrote this blog post: Mehn, I'm writing useful shit and all man.

Updating an Azure Service Project when Publishing fails

This post is for Windows Azure users who are using Windows Azure PowerShell cmdlets to fool around with your Azure Service's

Tally ho:
In case for some reason Publish-AzureServiceProject returns a bunch of cryptic errors that you don't care to understand. I would strongly recommend using Set-AzureDeployment.

Set-AzureDeployment requires a properly rebuilt cspkg Package. There are various ways that you can google to know how to rebuild the cspkg. I simply issue a Publish-AzureServiceProject command and when it reaches the uploading part, I ctrl-c and that exits the process prematurely without it going through the whole rigmarole and then getting stuck at those aforementioned cryptic errors.

Oh and make sure you use the -Force command when calling Set-AzureDeployment.

And here's a bloody good example (or so I like to think):

PS X:\ProjectsAndShit\MyServiceProjectFolder> set-azuredeployment -Upgrade -ServiceName "MyService" -Mode Auto -Package "X:\ProjectsAndShit\MyServiceProjectFolder\cloud_package.cspkg" -Configuration "X:\ProjectsAndShit\MyServiceProjectFolder\ServiceConfiguration.Cloud.cscfg" -Force

The above command (change paths and project name etc where ever applicable [like D'oh]) will do its mumbo jumbo and then ask you to enter a Slot. You have a choice, Production or Staging and you choose whatever the hell fits your bill. (Red pill/Blue pill sorta thing). Like so...

Slot: Production

That's it. Hope this helps you peoples!