UNIX and heavy duty printing

UNIX Printing JMILUG

UNIX and heavy duty printing This weekend I had to ensure that the posters get done within two days. The challenge was that on Monday it was Holi ( the festival of colors ), so naturally no designing and printing available on Monday. Thankfully my friend was there for all the professional help, all the way from designing till printing. Here in the pic is Saleem Ahamed standing besides the posters, who helped with all the designing and priting of BootConf 2014 posters.

Read more →

One more week to go

JMILUG

One more week to go We had a great day today in the planning meeting. First of all it was a nice get-together of some oldies and new members to JMILUG team :-).

Read more →

A simple Scala parser to parse 44GB Wikipedia XML Dump

Scala Wikipedia XML

I had to parse a Wikipedia XML Dump ( 44GB XML file uncompressed ). The XML dump is available here, and I have also created a smaller sample file to run this code: sample wiki.xml file. Below is the XML event based parser using Scala’s XMLEventReader: package xml import scala.io.Source import scala.xml.pull._ import scala.collection.mutable.ArrayBuffer import java.io.File import java.io.FileOutputStream import scala.xml.XML object wikipedia extends App { val xmlFile = args(0) val outputLocation = new File(args(1)) val xml = new XMLEventReader(Source.fromFile(xmlFile)) var insidePage = false var buf = ArrayBuffer[String]() for (event <- xml) { event match { case EvElemStart(_, "page", _, _) => { insidePage = true val tag = "<page>" buf += tag } case EvElemEnd(_, "page") => { val tag = "</page>" buf += tag insidePage = false writePage(buf) buf.clear } case e @ EvElemStart(_, tag, _, _) => { if (insidePage) { buf += ("<" + tag + ">") } } case e @ EvElemEnd(_, tag) => { if (insidePage) { buf += ("</" + tag + ">") } } case EvText(t) => { if (insidePage) { buf += (t) } } case _ => // ignore } } def writePage(buf: ArrayBuffer[String]) = { val s = buf.mkString val x = XML.loadString(s) val pageId = (x \ "id")(0).child(0).toString val f = new File(outputLocation, pageId + ".xml") println("writing to: " + f.getAbsolutePath()) val out = new FileOutputStream(f) out.write(s.getBytes()) out.close } } Xml pull parser for Wikipedia XML dumps: Find this code snippet on Github Lets see how long it takes to process all the Wikipedia pages in the 44GB XML Dump.

Read more →

JMILUG Meetup - 9th November 2013

JMILUG

Attendees: Hammad Haleem Saleem Ansari Pankaj Sharma Safiyat Reza Umar Ahmad Vivek Gupta Sawood Alam Viupl Nayyar Amit Shah There wasn’t a pre-defined agenda so the discussion took its own course. We discussed about many things: Sawood Alam shared his work he is doing in his research group at the Old Dominion University. Vivek Gupta shared what kind of challenging problems he is working on. Vipul Nayyar shared his GSoC experience during RTEMS project.

Read more →

Attending ScalaTraits 2013 event in New Delhi

Scala

First of all I was surprised that an event specifically targeted towards Scala was happening in India and very fortunately in New Delhi itself. I attend the ScalaTraits 2013 event in New Delhi a couple of days back. The event was put together by Knoldus, a company specializing exclusively in Scala and related technologies. Goodies at http://t.co/nzn0PN0GIN #scaltraits #scala #play #akka pic.twitter.com/X7MRA2U1fT — tuxdna (@tuxdna) August 24, 2013 The agenda was like this: Introductory talk This talk was an introduction to the Scala ecosystem as a whole by Vikas Hazrati.

Read more →

Deleting lots of spam content on a Drupal website

Drupal PHP FUDCON

Deleting Spam on FUDCON.in website After FUDCon Pune event in 2011, the website has been running as is. Just a couple of days back, I noticed a lot of spam accumulated on the website. However it is that content which is not displayed on the website, unless you know its URL. I located the last known sane activity and began estimating how much spam content I have to delete. Here I use Drush and a simple PHP script.

Read more →

Remote Desktop from a Linux client machine

Linux RDesktop

Connecting to Remote Desktop from Linux machine is easy. Invoke the following command rdesktop -r sound=local -r clipboard:CLIPBOARD -z -g '80%' -a 15 -u user.name -p - -d MYDOMAIN remote.hostname.com Above command does the following: Forwards remote sound to local machine Enables clipboard sharing Uses compression Makes the remote desktop screen to 80% of the local machine's screen Uses 15bit color depth on the remote desktop With user name user.name and password taken from STDIN Connects to remote.hostname.com at domain DOMAINNAME Thats it!

Read more →

Contiuned: Juniper Networks VPN from Fedora 64bit

Fedora Linux VPN Juniper

This post is the continuation of my earlier post about Juniper VPN. In the earlier post, I connected to VPN using a login/password/certification combination. Now I also managed to use the ncui tool for the connection which is based on a cookie value and a certificate. I wasn’t able to connect to this configuration using the method in my previous post. $ ./ncui -h vpn.example.com -c DSID="YOUR_DSID_COOKIE" -f vpn.example.com-cert.der Password: <ENTER SUDO PASSWORD HERE> Here, first you need to login to your vpn domain from a web-browser.

Read more →

Setting up OpenStack on Fedora 19 is a lot of work

Fedora OpenStack

I wanted to experiment with creating a Fedora 19 compute node on Fedora 19 + OpenStack. However it seems there are a bunch of issues which need to be fixed. The issues and solutions are already recorded by many people. I list the highlights: MySQL Server in Fedora 19 is actually MariaDB Server Keystone log file needs to be chowned to keyston:keystone Fedora 19 doesnt have kvm.modules file at the expected location I saw atleast one error due to selinux I am recording the errors, commands and references in the following gist on github.com: openstack-fedora19.md EDIT: Finally I managed to complete the setup.

Read more →

Emacs fullscreen and Fedora 19

Emacs Fedora

I was using fullscreen.el for so long but now that doesn’t seem to work on Fedora 19 / GNOME 3.8.1. What to do? Following are the steps I did for now. First install wmctrl: $ sudo yum install wmctrl Now add following code to your ~/.emacs configuration file: (defun switch-full-screen () (interactive) (shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen")) (global-set-key [f11] 'switch-full-screen) Restart Emacs and press F11. Thats it!

Read more →