BlogKontaktTagcloud

Jira status

After my last post I thought it might be also helpful to publish how many open jira tickets I have to my skype status.

You can get each jira search result also as a rss feed. Your browser does indicate the link to the result as rss. This url might look something like:

http://jira.example.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&&resolution=-1&assigneeSelect=specificuser&assignee=leo.buettiker&sorter/field=priority&sorter/order=DESC&tempMax=100&reset=true&decorator=none

To call this url, even if you have no valid session, you might add your user credentials at the end. This looks like:

&os_username=$username&os_password=$password

You could now use a xml or rss parser to interprete the returned feed. But for my result even that is too much, I only will count how many items in the feed are. The php snippet to do this will look like:

$jiraRss = file_get_contents($url);
$jiraCount = substr_count($jiraRss,'<item>');	
$jiraMessage = $jiraCount?" and $jiraCount open Jira Issues":"";

There might be a lot of other cool usecases you can simply implement (ticket you currently work on, Tickets closed int the last week, etc.). It's just a little bit sad that there is no REST API for Skype which would be make it easier to change the status between platforms.

Ähnliche Beiträge:
Mailstatus in Skype
PHP Quine
What's php like?
Zend Framwork 1.5 is out
Coding Contest addicted
Comments (0)  Permalink

Mailstatus in Skype

You all know the troubles with overflowing inboxes. I'm a bit fan of Inbox Zero and I found a lot of ways to work fast with my mails. I did switch off signaling ingoing mails, I use a lot of filtering and a good folder structure.

But sometimes my own lazyiness get into my way. So I started to put "Inbox Zero" into my skype status if I get my box empty. But after some times I decided to automatised this message.

I do know that Patrice does automated Skype updates with his Mac. After a quick search I found out that on Windows Skype has a COM-Api and they even provide a little PHP Example. With PHP it is also pretty easy so to acess an IMAP inbox (MS Exchange also provide a IMAP access). So I wrote a quick script that updates my Skype-Message:

$mail = imap_open('{mail.example.com}INBOX','leo.buettiker', 'password');

// Create a Skype4COM object:
$skype = new COM("Skype4COM.Skype");

// Create a conversion object:
$convert = $skype->convert;
$convert->language = "en";

// Start the Skype client:
if (!$skype->client()->isRunning()) {
  $skype->client()->start(true, true);
}


while(true) {
	imap_check($mail);
	$number = imap_num_msg($mail);
	$skype->CurrentUserProfile()->MoodText= 
		"Leo has currently $number mails in his inbox";
	sleep(5);
}

This does not only demonstrate how you can overcom your own lazyiness with open comunication and automated tools. It's in my point of view also a nice example what it's possible with PHP outside of the classical website rendering.

Ähnliche Beiträge:
Jira status
PHP Quine
What's php like?
Zend Framwork 1.5 is out
Coding Contest addicted
Comments (0)  Permalink

Skype und die Supernodes

Hin und wieder installiert man sich Software ohne sich zu überlegen was deren Gebrauch mit sich bringt. So ging mir dies auch mit Skype, die Software habe ich auf Empfehlung eines Kollegen ohne grosses Nachdenken installiert.

Im Rahmen des Faches Wirtschaftsinformatik 1 (Man, sind diese Beschreibungen veraltet!) hatten wir nun die Studie "From KaZaA to Skype" zu lesen. Dabei stellten wir fest das Skype die KaZaA Protokolle weiter zu benützen scheint. Dies ist auch der Grund das zwei Teilnehmer hinter NAT miteinander kommunizieren können, der Verkehr wird in diesem Fall einfach über einen automatisch auserwählten Supernode gleitet. Die offenen Versionen der Protokolle (die von Skype sind ja proprietär) die dies ermöglichen sind Traversal Using Relay NAT (TURN) und Simple Traversal of UDP trough NAT (STUN). Personen die Skype einsetzen und kein NAT benützen werden damit wohl zimlich sicher zu Supernodes und laut Wikipedia soll dann selbst eine 100 Mbit Leitung nicht mehr helfen um dem Traffic Herr zu werden. (Ein bischen wissenschaftlicher in diesem Paper.) Aber mich stört das ja nicht, da ich mich eh immer hinter NAT verstecke.

An dieser Stelle herzlichen dank an alle NATlosen Skypebenutzern die meine neue Telefoninfrastruktur zur Verfügung stellen.
Ähnliche Beiträge:
Jira status
Mailstatus in Skype
Comments (0)  Permalink
1-3/3