Ubiquity First Commands

well , it was my first Trial with ubiquity. The G-OSC team had to do a command <written in Javascript> for ubiquity, and the theme was something related to the Community G-OSC.

Getting the idea was a bit difficult as EVERYTHING is done in ubiquity lol . However i thought about something i thought i would be interested in. It is the Signature.

This is how it should go, wherever you are ,you can just Type Sign , it will give your G-OSC Signature. It types in any text field , right where the cursor is.

I faced some difficulties with how to manage the idea, and since I’m a typical Egyptian, i did this command the night of the deadline, so didn’t have time to search. I did it statically with my name and details. The modifications it will have , that the user will put his/her details along with the command name. Or Each user will be asked to put his signature in a page known to everyone , and my command will retrieve the data from this page. But that will be done some day soon. – if the time helps-

I also did  this fun command to tell you when will the ubuntu linux OS will be released. You just type ubuntu and it should open a page with a javascript in it tellin you how many days left.

The only problem is , i didn’t know how to run a javascript on a page online, so i did it locally. I will post the HTML page here , along with both commands.

Sign Command :

name: “Sign”,
execute: function() {
CmdUtils.setSelection( “–“+’\n’+”Yours,”+’\n’+“Mostafa Sheshtawy“+’\n’+“Software Engineer”+’\n’+” “+’\n’+”Big Buddy“+’\n’+”http://www.bigbuddy-me.com“+’\n’+” “+’\n’+”Mail:mostafaa.sheshtawy@gmail.com“+’\n’+“Mobile:0104601814“);

The italian font correspond to my information. can be changed to yours , if you wanna use it staticly.

Here is a shoft version of it with only Name and Job

name: “shortSign”,
execute: function() {
var date = new Date();
CmdUtils.setSelection( “–“+’\n’+”Yours,”+’\n’+”Mostafa Sheshtawy”+’\n’+”Software Engineer”);

Ubuntu Command:

name: “ubuntu”,
execute: function() {



<title>Ubuntu’s Countdown</title>


<script type=”text/javascript” src=”http://www.ubuntu.com/files/countdown/display2.js”></script&gt;


Hope you’d like it , and isA soon, when things start to get abit brighter, you will see a new Visualization for the G-OSC community using Processing and Bespin. Yeah .. things are starting to get very interesting. – Hard as well-

MERCY DR.Fatma 😛

P.S.  Omar Roushdy , i dedicate this work to you .


3 thoughts on “Ubiquity First Commands

  1. For your Ubntu command, you can use the code from http://www.ubuntu.com/files/countdown/display2.js in your preview function.
    This would make the command code looking like this:

    names: [“ubuntu”],
    preview: function preview(pblock) {
    d = new Date();
    dom = d.getDate();
    month = d.getMonth();
    year = d.getYear();
    if (year < 2000) year = year – 100;
    else year = year – 2000;

    if (year == 9 && month == 9)
    days = 29 – dom;
    days = 0;
    if (days < 0) days = 0;
    if (days < 10) days = '0' + days.toString();
    base = 'http://www.ubuntu.com/files/countdown/910/countdown-9.10-2/&#039;;
    pblock.innerHTML = '‘;


Got something to say!!!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s