tag:blogger.com,1999:blog-85773622754063972712024-03-13T23:29:02.342+05:30Real-time RuminationsMy tryst with technologiesVivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-8577362275406397271.post-18421208790285125542014-11-01T16:22:00.001+05:302014-11-01T16:23:56.048+05:30Redis MDEL command
To delete a key from Redis you have the DEL command. Very fast and works great. Now I had to delete a bunch of keys from Redis and guess what there is no MDEL command. Now the choices are that I can do a KEYS <pattern>* (in the older versions) or the new SCAN calls. Add Lua to that mix and we can create our own MDEL command.
I have uploaded the file to a Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-36577994404937526352014-02-17T17:13:00.002+05:302014-02-17T17:15:39.212+05:30Installing Ubuntu on a Lenovo Z580 and making Wifi work
Lenovo has a laptop model Z580 that comes with a broadcom chipset for Wifi. This will not work out of the box with Ubuntu 12.04.04 or Mint. Even a kernel upgrade to a newer kernel did not help. Hacking through the documentation I found that there is a section on Ubuntu's website that explains the problem in detail. Instead of providing the detail on the same here on my Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-65921205610845803292014-01-13T06:59:00.002+05:302014-01-13T07:00:08.474+05:30Reset the XFCE Desktop on Mint Maya
every so often I attempt something crazy and mess up the fvwm on my XFCE desktop. This will result in the Window manager misbehaving and it doesn't matter if you logout or reboot because it faithfully saves the settings and restores it. Here is how you get rid of the messed up settings
First, attempt to clear the cache.
cd ~;rm -rf .cache
This should hopefully clear out the Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-8064254243046995472013-12-31T07:16:00.001+05:302013-12-31T07:17:27.296+05:30Sequence numbers from pymongo
I was looking for a way to generate in a multi process environment unique sequence numbers. My development language was python and the underlying database was MongoDB. I found a fairly simple way to do this in MongoDB.
def getNextEventSeq(idkey):
nextId = seqtab.find_and_modify(query={'_id':idkey},
 Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-31216209830130844332013-10-05T18:04:00.003+05:302013-10-05T18:04:54.539+05:30Interesting Internet prank...
I just ran into this prank. What was impressive was that it was done at the TCP / network level by a bunch of bored geeks. I am sure the number of machines and network ports involved would have been interesting to know.
If you are on a windows machine try doing this
tracert -h 100 216.81.59.173
If you are a diehard linux fan. try this one
tracert -m 100 216.81.59.173
Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-36596905028133463952013-09-21T06:03:00.000+05:302013-09-21T06:03:19.785+05:30Renaming a branch in git
Many a time we do the mistake of calling it something and figuring out that we really meant something else. Git branch names are no exceptions :) So here is how you rename a git branch
git branch -m oldname newname
Thats it. Short and simple in case you were trying to rename git branches
Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-30960759453643733362013-09-12T23:47:00.000+05:302013-09-12T23:47:06.043+05:30Javascript has grown and CDN failures - Oh My!
For
a long time I considered javascript to be a fairly childish language
(and rightfully so since my days of working with Javascript goes back to
the original navigator days) and I had actually lost track of the
language for over a decade! I have been recently looking at the
language as it seems to have become this new programming language for
the real time web and frankly Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-79564509319500226812013-09-12T23:18:00.000+05:302013-09-12T23:18:15.016+05:30Getting rid of the brace matching in VIM
For some strange reason VIM has a very bad habit of matching braces rather greedily. Every time you get on top of a brace, the cursor jumps willy nilly trying to find the matching brace and possibly making strange noises when it cannot find one.
I personally hate that behaviour as much as I like my VIM so here is how you turn it off. On your ~/.vimrc add the following
let Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-873191464997453522013-09-06T09:02:00.002+05:302013-09-06T09:02:28.178+05:30Linux Mint Maya Trackpad trouble
I just got a new thinkpad T430 that has a synaptics trackpad. Strangely the trackpad would not work correctly once the laptop goes to sleep and wakes up. The little red knob IBM thingy would work fine but the trackpad and the associated buttons were not working fine. Found a nice workaround for it that I thought I will share.
The idea was to disable and enable the Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0Chennai, Tamil Nadu, India13.0524139 80.25082459999998712.5573929 79.605377599999983 13.547434899999999 80.896271599999992tag:blogger.com,1999:blog-8577362275406397271.post-22195748007807669502013-09-06T06:20:00.001+05:302013-09-06T06:20:37.505+05:30Linux mint maya outdated ISOs
I just installed Linux mint maya xfce on my new IBM thinkpad T430. I downloaded the latest ISO from linuxmint.com burned it to a DVD and went through the installation. The DVD was about 795 MB in size and the installation went fairly smoothly.
Once the installation completed I did the obvious
apt-get update
apt-get upgrade
Boom this hits me now
Reading package lists... Done
Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-50868903279813249432013-01-01T23:27:00.002+05:302013-01-02T00:11:13.533+05:30Redis + Python : Connection management and not RTFM
I am fairly familiar with Redis having used it in an earlier project in java. This time I started to use it in Python given that I was completely sold on its simplicity and performance. Having spent quite some time I decided to just jump in with a pip install redis.
To create a redis object you use the following code
import redis
mypool = redis.ConnectionPool(connection_class=Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-47343771638835045802012-12-07T20:30:00.004+05:302012-12-07T20:30:48.101+05:30Managing my ubuntu security patches
I use ubuntu server as my key linux development environment. It is fairly up to date and today in fact that is the topic of my post. Many a time Ubuntu tells me that there is a whole bunch of updates that I have to install and I dont have the patience to figure out which ones are needed and why. While I have always wanted to get the security updates installed, I really didnt Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-30521302031306960772012-07-05T16:30:00.001+05:302012-07-10T11:01:42.723+05:30Wrestling with gevent-socketio
I just spent most of last week attempting to get gent-socketio to work. First problem that I ran into was that nobody seems to have used it with adobe flash based fallback on browsers that do not support websocket. This method is referred to in the socket.io library as flashsocket. I was pretty confident that nobody has tried it since the swf file required by socket.io was Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-82539210016502814742012-06-26T12:00:00.001+05:302012-06-26T14:13:23.255+05:30Using Monit to monitor a Redis instance
I have been using Redis for a long time now (since version 1.x) - the challenge has been how to start and manage an instance and get alerts when it is consuming too much memory. This is where Monit comes in - it can monitor various Unix daemons and provide a single dashboard to view status, manage restarts etc.,
Here is how I have configured monit to watch redis
check process Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0tag:blogger.com,1999:blog-8577362275406397271.post-43765149644724992992012-06-25T17:27:00.001+05:302012-06-25T17:27:03.686+05:30Hello world
A new domain and a new blog. This is my new beginning. Vivek Venugopalanhttp://www.blogger.com/profile/04013008785463978229noreply@blogger.com0