For past few weeks I have been gathering my notes on two topics: Machine Learning with Apache Mahout and Programming in Scala. Now I have created two repositories for these two books, with source-code in AsciiDoc format. They are avilable on GitHub.
Everytime I load a heavy application such as Eclipse or Thunderbird, I see this annoying message which keeps repeating even if I press “Wait”.
"Eclipse" is not responding. You may choose to wait a short while for it to continue or force the application to quit entirely. [Force Quit] [Wait]
So I decide to figure out what code is making the popup window appear. It turns out that the function named
delete_ping_timeout_func is called whenever a timeout happens. Code with exact line number is present here .
However I didn’t find any code which reads a timeout value from some configuration file. Is there a mechanism using which I can configure the delete window timeout value? Essentially I would like to make the timeout value to about 4 minutes.
As an aside, I see that metacity developers mailing list has not had any post since year 2011. So is it worth asking it on that mailing list?
OAuth2.0 supercedes OAuth1.0 protocol, specifically in making it simpler to use. It supports different workflows as described in its specification RFC-6749. The most concise pictorial representation I found is here.
I created a Play! 2.0 Application in Scala which supports server to server token exchange using OAuth2.0 Protocol. You can find the project source code on GitHub at play-oauth2-server. Its a complete working server codebase, with:
- Basic User login
- Client registration with Callback URL
- Auth Code generation
- Authentication Token and Refresh Token generation
This application also demonstrates the following:
- Twitter Bootstrap library using WebJars
- Typesafe Slick 2 library for database access
- Scoverage for Scala code coverage
- and Specification Tests
This post is about the talk I was supposed to give at Ruby Camp 2014, Delhi/NCR. After all the preparation, slides and code I missed it. Unfortunately, I fell sick overnight and I couldn’t make it. Apologies for that.
The best I could do is upload all the material online on GitHub and my website.
Lets say you have a bunch of source code files in a project. Whenever you change them, you want some HTML to be generated. After that you go to browser to see how the change looks now. Here is the workflow:
- Step 1: Change file(s)
- Step 2: Run a build script to generate HTML
- Step 3: Open / Reload the page in browser
Well we can automate all the three steps into one using a couple of tools and some scripting magic. We will need a
nc tool and MozRepl.
Install inotify tools and netcat:
sudo yum install -y inotify-tools nc6
Install MozRepl as described here: Refresh Firefox page from Emacs
Make sure that you have started MozRepl by restarting Firefox. Then
Alt+T then Select
Now create a simple script to watch for changes like so:
while inotifywait -r -e modify src/ do # put your command here to generate the html from modified files make # now refresh the browser echo "BrowserReload();" | nc localhost 4242 > /dev/null end
Keep this script running while you make changes to the source code. You can also automate this with other build tools ( such as Maven, SBT etc. ) and editors ( such as Emacs )
I was using Chromium Browser on Linux, to see World Cup 2014 videos on YouTube. Some videos were not available in my region because of restrictions by region. If you are also seeng the same message, the you may want to setup a SOCKS proxy, and use that to bypass the YouTube restriction. For this to work, you need an SSH server what is located in some region from where you can access such videos.
Setup Socks v5 proxy:
ssh -CND 1080 email@example.com
Start Chromium browser with this proxy by default:
$ chromium-browser --proxy-server="socks5://localhost:1080" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" ATTENTION: default value of option force_s3tc_enable overridden by environment.
Now you can watch those restricted by region videos.
Download the Scala IDE from here, unzip it at
~/software/scala-eclipse, such that the contents look as follows:
$ pwd /home/saleem/software/scala-eclipse $ ls artifacts.xml configuration eclipse eclipse.ini epl-v10.html features icon.xpm META-INF notice.html p2 plugins readme
Create a launcher script for Scala IDE
/bin/scala-ide, and make it executable:
$ cat /bin/scala-ide #!/bin/bash /home/saleem/software/scala-eclipse/eclipse $ chmod +x /bin/scala-ide
Configure launcher icon
~/.local/share/applications/scala-ide.desktop. You can copy a config file from
/usr/share/applications/ directory and make changes as follows:
$ cat ~/.local/share/applications/scala-ide.desktop [Desktop Entry] Version=1.0 Name=Scala IDE GenericName=Scala IDE Comment=View and edit files MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; Exec=/bin/scala-ide %F TryExec=scala-ide Icon=/home/saleem/software/scala-eclipse/icon.xpm Type=Application Terminal=false Categories=Utility;Development;TextEditor; # StartupWMClass=
Now you can invoke scala-ide from
shell ( command line ) or via desktop search (
I attended BootConf 2014 today.
The day began with Arduino for Robotics by Naveen Kumar. It was such a wonderful 1 hour session, purely demo based, and very interactive. Second talk was Varnish Caching Server by Vivek Gupta. Vivek explanined how a caching server fits in a clustered environment and what all things that we can do with Varnish.
Finally, the last session was Open Stack by Sajid Akhtar. Sajid showed a high-level overview of how OpenStack is made, what the opportunities are, and how the contributers from around the globe make OpenStack an awesome project. OpenStack is the most popular Free and Open Source cloud provisioning and management system.
I had to leave early so I could not completely attend this last session. I also missed the Open House session, which I will catch up with tomorrow.
More details follow:
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. Applaud for him
These machines grabbed my attention as desktop looked quite similar to GNOME Desktop. I suspected that these could be Sun Workstations. I actually did get the permission to type in
uname -a on a terminal of these machines
:-). What was stunning for me, was to see
SunOS in the output and also GNOME desktop.
UNIX does power the Digital Printing business on the Heavy Duty Printers ( from XEROX ). Interesting indeed.
Are there any Linux based workstations for heavy duty printing machines ?
Finally, here is the result of the hardwork: BootConf 2014 poster