10 July 2012

Introduction to Grok web application framework @ UCTI

Hey folks, we, the Fedora Malaysia community in conjunction with UCTI Free & Open Source Software SIG, have planned for an introductory workshop on Grok, a web application framework. It uses the Zope Toolkit (ZTK).

This session is aimed towards finding more python as well as zope/plone/FOSS developers  in Malaysia. The session is mentored by our very own Fedora Ambassador, Izhar a.k.a KageSenshi, who works at a local Plone support and service company called Inigo Consulting.

Following are the details of the session:
Date: Sun 15th July, 2012
Time: 11:00-18:00
Venue: Level-2 Room-5 (L2-5), UCTI (Google Maps: http://goo.gl/maps/dI7h)
Fee: Free Of Charge ;)

Folks coming to the session, (that's you!), should bring along their own laptops (obviously!) and do not necessarily need to know Python, but need to have programming knowledge. Learning/knowing Python can be enhanced later on. Also need to know basic/intermediate HTML/CSS/JS.

Although, we prefer Unix/Linux systems like Fedora, users are welcome to use any platform that they wish, provided that they know how to install Grok or any other software packages and troubleshoot problems if they arise.

We might be passing around some Fedora 17 if we happen to not finish them off at Malaysia OpenSource Conference. :P So, if you happen to know how to use *nix system and just need to boot it up to it, you can use a virtual machine to boot into a *nix system using the CDs/DVDs passed around or you can also ask me, for an ISO image before the session, if you need one. :)

See you all there!

Links:
Zope/Plone User Group Malaysia G+: http://goo.gl/HcM7n
Zope/Plone User Group Malaysia Maliling List: http://groups.google.com/group/zplug-my

4 July 2012

Zsh Autocomplete Function to change and auto complete directories' name

About some weeks ago, I was trying to find a way to alias my favourite directory (~/Programming/Pythons) in zsh, and it should show me the directories contained inside it. But aliasing doesn't work, except to `cd` me to that directory. Or a function can help me get into the directories inside ~/Programming/Pythons but I'd have to type out the directories' name manually. That wasn't an option either.

So I turned to "Uncle Google" :P for it. Also what I remembered from Zsh is that it's auto completion is really awesome. So I searched for "zsh autocomplete function" and read some stackoverflow examples and stuff. But I had some errors if I was using oh-my-zsh's functions.zsh to store/write my zsh auto complete function in it.

What I did was, instead of writing that auto complete function inside oh-my-zsh's functions.zsh, I wrote it directly inside .zshrc, like this;

function prog() { cd ~/Programming/Pythons/$1; }
_prog() { _files -W ~/Programming/Pythons; }
compdef _prog prog


What this code actually does is that when you type prog after sourcing your .zshrc file, it expands the defined directory, in here; '~/Programming/Pythons/' and the argument $1 is based on whatever directory you selected from the expansion of the directory from the function  _prog(), like this;
Zsh Auto Complete Function
This exactly did what I needed. If you got awesome auto complete functions written, do share it at the comments. :)

source [0]: http://zsh.sourceforge.net/Guide/zshguide06.html
source [1]: http://stackoverflow.com/questions/10700012/zsh-autocomplete-function-based-on-2-arguments
source [2]: https://wiki.archlinux.org/index.php/Zsh#Command_Completion

25 April 2012

Spreading Fedora Love - One At A Time

Disclaimer: This post is actually abit overdue. Was supposed to be up by Tuesday, but some stuff caught up.

Event Details
* Time: 10:00 - 16:00
* Date: 23rd April, 2012
* Venue: UCTI
* Aim: Sharing knowledge/Teaching about GNU/Linux operating system(s).

This event was organized by rebelk0de and I, Maverick. I have been contributing to Fedora Malaysia for about ~5-7months now, while rebelk0de has long since contributed/helped Fedora MY.

It was aimed at sparkling the GNU/Linux and FOSS enthusiasm in UCTI, the event venue for FUDCon KL. Since UCTI had thousands of students, we had to start off with something smaller. So, we look for a small group of technical folks among the students, and we found the UCTI Technical Assistants (TAs). TAs work in the UCTI computer labs to maintain approimately 300 computers running Windows operating system, daily.

And as recently, I, together with rebelk0de (as advisor) and a small group of 4 people, have been working hard to get UCTI Free & Open Source Software Special Interest Group (FOSS SIG) back into shape and in official status. Therefore, as a recruitment drive, to share knowledge about FOSS & GNU/Linux and to promote & expand the "Fedora Love" to the folks here in UCTI, I was there at the date of the event.

The event's objective was to get Fedora and Ubuntu running with little or no headaches involved for beginners. And to understand abit about getting the installed operating system up and running with things the users needed getting installed on a as needed basis, so, mainly it was about teaching them how to make use of the "yum" and "apt-get" package management utilities.

The event started around 11:00 and was headed by rebelk0de. I was the assistant ;), mainly to help out when folks couldn't catch up or something went wrong with their Fedora installs. I mainly shared my knowledge about "things to watch out for when installing Fedora", especially, the different types of installation processes and some tips & tricks for beginners. I also distributed some leftover Fedora 16 CDs that I had from this year's FAD, almost all of the folks that showed up got it.

We took off the event by installing "Fedora" on the virtualboxes which took approximately 30mins. The installation environments were inside virtualbox on Windows hosts. The reason to take this approach was that we would have needed a lot of extra precious hard disks for this one event, the machines retains their changes after reboot (so it was easier to use virtualboxes) and most of the folks who showed up have never installed/used either Fedora or Ubunt and GNU/Linux in general. Most of the time was taken on explanining the installation process and post installation configurations such as "adding their users to the sudoers if they forgot to add it" and about using the vi text editor.

Most of the tutorial/hands-on were done on Fedora. Ubuntu was just used to show how to use the package management utilities. We all had a lunch break around 14:00-15:00. And we wrapped up the event by 16:00.

rebelk0de and I have promised the folks to have more continuous classes for them in the future, and they have agreed. So, on with more classes/events then! :D

P.S. Will share the event photos after getting uploaded to Fedora My's Albums. ;)

Edit: Here is the photos from the event: GNU/Linux Intro Class at UCTI

23 April 2012

Getting Python Libraries Installed The Normal Way on Windows

I've been using GNU/Linux distributions for almost 2 years and with Fedora for about ~7-8 months.

Every single day I do some experiments with python, and every single time it makes me feel comfortable using Fedora to write scripts. It removes headaches from happening because I don't have to figure out ways to install python libraries you need. I can just go forward with concentrating on coding.

There's a little script I wrote called; ucti-timetable. It's used to download timetables from my university and store them locally. But since a large user base from my university are windows users, I had to make it work on windows as well. Well, to be honest it works, but only one thing:

PAIN!!

It's so painful to install a python library on windows. It fails most of the time...why is that?, you ask me..

Well, it's because the python executable path is not in your $PATH. dafuq, right? So, yeah, this is how you do it (based on Windows 7):
Right click -> My Computer -> Properties -> 
Advanced System Settings -> Advanced tab ->
Environment Variables -> System Variables
after that find
PATH
and append this or equivalent (depending on where your python gets installed):

C:\Python27\


Only after you do this you could install BeautifulSoup the "normal" way.
    python setup.py install


Insane, right?

21 April 2012

Blogger CLI Posting Tip

What do you do when you're a geek who uses Fedora, needs to write blog posts on blogspot.com and like only command line based clients?

Well, you do a 'yum search', of course. And then there you will find something called 'googlecl'. So you do

# yum install googlecl

Now, you could just write a blog post within a text file and post to the blog by doing;

% blogger post --tags "GoogleCl, Fedora" --src /path/to/post/file --title "your post title"

That's it! :)

//posted from googlecl on fedora 16 :)

6 December 2011

Hello World!

Welp, this is the first post on this blog. :)
Watch this blog for some #GNU/Linux, #FLOSS, #InfoSec & #Coding tips 'n tricks!


//posted from googlecl on fedora ;)