Archive for the ‘Programming’ Category

A Modified Flash Random Number Generator

Friday, December 24th, 2010

A few weeks ago, I was tasked to create a little program that would generate a random set of numbers in a specified range for a Christmas party in a very limited time (in a span of less than 4 hours).

A quick search in Google showed Flanture’s random number generator. It had 3 digits and when the roll button was pressed, a random number from 000 to 999 would be generated.

I wanted more flare and some fancy effects to go with the random number generator (for one, I needed a specific range of random numbers). And it was a 4 digit number, not just a 3 digit number.

Modifying the flash and actionscript was simple enough.

I added some modifications to add flashvars to the original code such as:
ftitle: Title shown to the flash app (value below is “Christmas Raffle”)
minval: minimum value in the range to be shown (value below is “3000″)
maxval: maximum value in the range to be shown (value below is “5000″)

If you want the modified source code (with other effects and range of random numbers), you can get the source code here.

New Blender WIP Updates Plus Blender Windows Build SVN!

Friday, May 28th, 2010

Hi all,

Sorry for the long delay in posting. Been quite busy lately (real life and trying to make ends meet – poor developer here :) ). Anyways, there’s a new WIP render of the Sintel Open Movie by the Blender Foundation. Remember it’s a work in progress (some bugs in blender build causing some problems in the render).

Anyways, here’s a youtube video of the wip:

Also, two weeks ago, a trailer of the Sintel movie came out:

All in all, it’s an impressive feat for the Blender team considering they are both working on the movie, plus working on improving blender as well!

And here is what you windows guys are waiting for – an installer for the blender 2.5 alpha 2 svn build date 5-28-2010.

Get your windows blender installer build at the ostalks ibiblio mirror now.

Arora 0.10.2 – Moblin

Saturday, March 27th, 2010

Since I’ve been working on the windows installers for arora – I realized there were no arora rpms for moblin.

Presenting arora 0.10.2 rpms on moblin. Fast, lightweight and excellent flash support too (flash seems to play faster in moblin than on firefox).

Get it from the ibiblio moblin repository now.

Arora 0.10.2 Stable With SSL Support Windows Build

Thursday, March 25th, 2010

For those finding the latest git windows build of arora is too buggy for you, here’s some great news.

I have compiled openssl 0.9.8n dlls on windows, and used them for the arora 0.10.2 stable build. With these in mind, arora 0.10.2 is running as sweet as ever.

You may download the stable binary for windows installer at the ostalks ibiblio mirror

How To Create Your Own Yum Repository in Moblin

Wednesday, March 10th, 2010

I received a question from an email on how to create your own yum repository.

I am basing it on Moblin/Meego, but should mostly work on Fedora/RedHat too.

I am assuming that you have already installed the development tools of Moblin in your installed Moblin distribution by using this command:

sudo yum groupinstall “Development Tools”

To start, we install the createrepo package – we can get it from the Manage Apps application in the Moblin Applications->Settings tab.

Once installed we can now create the repository using the commands:

mkdir -p /[path of your moblin repository root]/Moblin/[moblin-release version]/{SRPMS,i586}

We use i586, because Intel atom processors are basically of arch type i586.

You may want to create i386 generic files for whatever use you want, so you can use {SRPMS,i386,i586} instead above.

If you do so, you may want to automate the process by creating a bash script named createrepo.sh and writing in the following code:


#!/bin/sh
destdir="[path of your moblin repository root]/[moblin-release version]"
for arch in i386 i586
do
pushd ${destdir}/${arch} >/dev/null 2>&1
createrepo .
popd >/dev/null 2>&1
done

Every time you add a package, call this script and it will create the metadata using the createrepo tool in the i386 and i586 directories.

Upload this directory structure to the server where you’ll be hosting your repository.

The .repo file you will create will most like be similar to this:

[mymoblinrepo]
name=My Repository
baseurl=http://myserver.com/repo/Moblin/2/$basearch
enabled=1

$basearch will be the arch type of the distribution. For Moblin you can hardcode it to i586 instead.

Anyways, that’s about it. Cheers!

Dream Big – An Open Source Tale

Wednesday, March 10th, 2010

Don’t ever let yourself be put down because other people say it can’t be done.

This is a simple story of how leveraging open source technologies can bring you to heights and depths you thought you could never reach.

Around 2002, November, I was asked by one of our ministry head to think of a way to make a new website geared for students. When I think of now, it was really like a social network on a much much smaller scale.

The situation here on the student network’s proposed site was this: they had already searched for a software development firm in Manila and asked for a quotation and timeframe of the work. They said it would take 3 months, and about a six digit amount to get it done. Since that was way too much, they decided to look into the outreach here in Cebu and ask around if there were any people somehow knowledgeable enough to take the challenge.

A few months before, where I was working, I had started studying and implementing some LAMP architecture on the corporate website. Mind you, my skills then were not so mature yet. PHP was still version 4.x and there were even some 3.x versions around. You can even call me a greenhorn (newbie) during this time – on the company I was in, all I had was Dreamweaver 4 to work upon the website, and some tutorials from the web on how to set up and program in php.

To make the long story short, I and two other people from the community (serving in ministry work), were tasked to do what one would have thought to be impossible to do during that time – make the student network site, complete with interactive forums and one login registrations to be part of the site, and with ALL content in less than one month. Yes, that’s right, the site was going to be launched a little bit after Christmas.

Since I was working then, we had to take turns in programming and developing the site. I was the head then of the 3 person team in Cebu. The two were not working yet, so I tasked them to make the different sections of the site. We were working at my home (no problems, I was single then :) ). Some people from our main branch in Manila were sending designs for us to cut and slice and place in the site.

After of almost a month of non-stop work on the site. It was done, and uploaded to a shared server through dialup (it would take 3-4 hours to update the whole site).

What’s the lesson of this experience? If I were to use proprietary software and languages it would be a whole lot more expensive (I knew there was asp, and coldfusion, but hosting for that was expensive). We had to use the one available on most cheap servers at that time, and that was a LAMP based server. We leveraged free forum software and modified it and integrated it into the site’s one login and registration. If we had started from scratch we wouldn’t have had finished the site on time. Open Source is all about collaboration, and this experience has taught me a lot about coordinating remotely too.

Looking back, I was to lead the original web team here for about 2 more years, before moving on (by then they had grown to more than 5) – after which, I was still assigned to the original website which we made, and helped worked on two more sites and administered the ministry’s server (which was now a dedicated server). The site which we first started won the Catholic Mass Media Awards for Best Website for 3 straight years before becoming a Hall of Fame Awardee. I was incidentally there using a borrowed suit during the first time we won (it was held in Ateneo and televised nationwide, hosted by some guy and Donita Rose), and that by itself was an experience I’ll never forget. You can get the list of winners during the first time the site won at the cmma foundation website here.

Dream Big. It can be done.

Gambas2 in Moblin; RPMS in Ibiblio

Sunday, March 7th, 2010

Hi all,

I added Gambas2 for moblin with a few caveats:
- no mysql for gambas
- no kde for gambas
- no firebird for gambas

This is because these libs are not available in the official moblin repository, and I, as much as possible follow dependencies on the main repository.

For those who don’t know what Gambas is, it is a free development environment based on a Basic interpreter with object extensions. I call it like VB on linux. You can make GUI programs in Qt or GTK+ and save your compiled application in RPM format.

Also, the moblin repository for ostalks is now in ibiblio. It should be up shortly (I’ll update this blog when the files are fully uploaded).

Update: Moblin rpms are now hosted at ibiblio

Just copy and paste this text for your moblin repository.

[ostalks_moblin]
name=OStalks Moblin Repo $releasever – $basearch
baseurl=http://mirrors.ibiblio.org/pub/mirrors/ostalks/moblin/RPMS/
enabled=1
gpgcheck=0

It should be available here:

http://mirrors.ibiblio.org/pub/mirrors/ostalks

Have fun!

Wine 1.1.38 In Moblin

Tuesday, February 23rd, 2010

Again,

A quick post on Moblin repository updates.

I added wine 1.1.38 on my small Moblin repository. Aside from this, I added sane-backend, libieee1284. I also backported latest gphoto2 and libgphoto2 sources into moblin as well.

This should all be working properly. If there are any dependencies which I forgot to upload, please do inform me.

Moblin Repository Started

Monday, February 22nd, 2010

Hi there guys,

I noticed moblin’s repository of packages are quite limited. Yes, I know, moblin is gonna be meego in Q2 2010, but for the moment, I need my application fix.

Presenting a little moblin rpm repository until I meego comes, or whatever…

Two applications are in there, GFtp and Gnumeric. Those applications fitted my requirements for a useable netbook system.

To use the repository, just enter this as ostalks_moblin.repo in the yum.repos.d folder (updated to ibiblio):

[ostalks_moblin]
name=OStalks Moblin Repo $releasever – $basearch
baseurl=http://mirrors.ibiblio.org/pub/mirrors/ostalks/moblin/RPMS/
enabled=1
gpgcheck=0

I am also willing to compile applications for you guys, when I do get the time – I’m doing this on my own free time.

Have fun installing!

Just Fun Stuff – LUG Meeting

Friday, February 19th, 2010

Well, it’s a short post.

Since I was around the area and was more or less free during the time, I attended a short meeting with a local Linux Users Group at the G2iX Techbar, IT Park, Cebu City, of which I am a member.

There was basically a short talk on Liferay, an Open Source Portal, Collaboration, Social Networking tool written in Java. After the talk was a discussion between the members about activities within the year.

Like I said, nothing much. People like Tom Wickline, head of the Bordeaux Group (a front-end to WINE), and writer to Wine-Reviews attended the meeting.

It also allowed me to show off my netbook running Moblin.

For those who don’t know who G2iX is, they’re a company headquartered in Manila, and specializes in Ruby on Rails development, Java, Dev Automation and Cloud Platform Deployment. They have also received awards like the Top Asian TechnoVisionary Awardee for 2006/2007 by ZDNet Asia, Top 20 Open Source Companies by Red Herring, among others.