a plesant evening
work today
8 10 2007Today, I started working from the morning
. For Yaat(the Annotation Tool), I made up a small website. I thought about installing trac [from edgewall.org] .
What is trac ? Why trac? Many websites which use svn for maintaining their code are using trac to host their sites.
Trac is a web-based software project management and bug/issue tracking system emphasizing ease of use and low ceremony. It provides an integrated Wiki, an interface to version control systems, and a number convenient ways to stay on top of events and changes within a project.
I will keep it simple. http://trac.wordpress.org/ . One of the most popular open-source projects (wordpress) uses trac.
It took me a little bit of time for installing it. Had some problem with mysql with Trac ( installed v.0.10.4 ). Finally shifted to sqlite.
Now, its the time for configuring the webserver. As trac is written in python and by default, Apache does not have either mod_python module or Fast CGI installed(OS Specific) . I could not find the required rpms (rpm is the package manager for RedHat based OSes).
Installed mod_python and a little bit of configuration and viola ! its done ! The bad part is , a lot of time got wasted in searching for the rpms
.
Now the svn repository . I had a repository in my old machine which contains some projects out of which yaat was one of them.
The problem now: One repos, require backup of 1particular project out of 8. Searched up in the svn redbook. But , turned out unlucky
. There were only articles about how to take incremental backups and dump them back. After a little more googling , ended up lucky. This is the code snippet for creating a new repos from the old one along with the filter for filtering out based on the project name
. svn rocks
.
svnadmin create newrepos –fs-type fsfs
svnadmin dump repos | svndumpfilter include yaat | svnadmin load newrepos
If you dont give the fs type as fsfs, you may face some problem when hosting the site on trac. ( I got that problem, so I am not sure about it ).
`yaat` was my project name, repos was the old repository and newrepos is my new repository . Actually `yaat` here meant it searches(greps) for `yaat` in the list . And tadaaa. the porting of the projects done ! . But almost a day got eaten up because of this !
. Anyways if I want to install it again , I will end up facing less no.of problems than I had earlier
.
Comments : Leave a Comment »
Categories : Mis¢
google talk – change display image hack
5 10 2007Ques) Ever wanted to change your display image (in the Google Talk Application) into an image found on the net (some Google Doodle) ?
Ans) Yes, you can. Just copy the image URI (URL) and paste it in where it asks for the filename in the File Popup Dialog box(the Qt style of viewing [painting] widgets) . I am not sure its the work of Windows(M$) File Dialog Widget or the Google Talk Application ( mostly Google’s ). Make sure the URI ends in one of the supported image formats (bmp, gif,jpg,png), else there can be problems.
This post can also be labeled as “Create Thumbnails using Google Talk” [
] which looks a bit funny. btw, did you can see your display image in the URI http://mail.google.com/mail/photos/username@gmail.com .
So if you want thumbnails, upload an image, go to the above URI where you can find the photo in the thumbnailed size
Who wants to save thumbnails this way anyways ? My guess , none !
Ques) Can I get a smaller thumbnail ?
Ans) Yes, add the arguments “?sml=1″ to the previously specified URI and you get the smaller image.
Ques) Can I get an image of size 100×100 when I resize using this
Ans) Probably, you cant. I am not the one who did it, ask Google
( search in Google ) . Try any of the online / web image editors ( Usually come in flash or js (for dynamic event handling and ajax) + serverside ( php or smth) . Adobe has recently released one , didnot check it out yet but, I am sure it rocks !
The next post I will be probably writing about how to know / identify blocked users in your Google Account ! interested ? Wait up then. I am not totally confident about the procedure . I will atleast post about my approach if I am not successful
Comments : 1 Comment »
Categories : Fr€€W@r€, G00g|€, Mis¢, |-|@Ck$
OAuth !
5 10 2007I wanted to keep the post short
more details/tags for the url http://oauth.net/ -> http://del.icio.us/url/f631b4aae495769557fc0bc6d7f16149
Comments : Leave a Comment »
Categories : Mis¢
things to do!
3 10 2007I thought of this idea or “things to do” when I was a bit ! happy.
If you are un-happy or frustrated , try to
- Think of things which make you happy ! really happy
- Organize your data on your system in a good way so that when you take backup or delete stuff you can do it for the directories.
- Organize your clothes,books etc.. in the real world.
- Talk to people who dont talk topics which piss you off or talk to people who are really close to you.
- Think about your life how it was age-5 to age-10 years ago ! (where age is your present age)
- Design a webpage or hack one.
- Try to know about XSS and find one in GMail.
- Read comics / jokes.
- Think of ideas and write them down.
- Listen to rock songs in high volume, really high volume.
- Drink hot coffee (works for me)
- doze off
- Try to hack some captcha ( try some image processing ).
- Hack stuff !
- get an argument with someone and kick him up bad ( dont get kicked up ).
- If you want something really new , visit Wikipedia. ( wont work for me though ).
I wrote up this post so that it will be easy for me to refer what todo when I get the feeling.
Comments : Leave a Comment »
Categories : Mis¢, My Lif€, Random Post
imdb-rightclick-hack
15 09 2007Was going through the image gallery present in IMDB. Noticed that I could not save the image I was viewing because right-click wasnt working.
There are two ways to save the image in Mozilla Firefox
- Click Tools -> PageInfo and in the Media Tab you can find the images and click on the image and click “Save As..”
- View the source of the page. Get the image location , copy the url and save the image.
Once one sees the source, one will findout that the contextmenu is being replaced. It looks something like
<img src="imagelocation.jpg" oncontextmenu="return false" />
If its possible for you to change this value in the contextmenu, you can directly get the right-click option enabled. Thinking about the post title, I should have named the title as “How to disable rightclick in Mozilla Firefox ?” . By the way, the code that works removing rightclick in imdb is
javascript:for(i=0;i<document.images.length;i++) if(document.images[i].oncontextmenu)document.images[i].oncontextmenu="";void(0)
Read the rest of this entry »
Comments : 13 Comments »
Categories : 0p€N$0uRc€, firefox, Mis¢, tUtori@L$
flickr-hack
5 09 2007Was browsing thru flickr and suddenly thought of saving an image. When I right-click and do ‘Save Image As’, I get the image some spaceball.gif . This was one of the hack which I saw sometime ago for preventing users to directly download the image. I was struck with this idea, how to save the original image ? I got only one option
- Grease Monkey Script
I started out writing the greasemonkey script and then it suddenly struck to my mind
- Adblock Plus
Adblock Plus will do something related to my requirement . I just need to block the image from my view.As it is a gif , a transparent one, it wont effect anything . Just right-click and block the image spaceball.gif and tadaaa.. you are done. From next time on, when ever you load a flickr page, you can directly save it with right-click and ‘Save Image As’ and you are done.
Assuming you are using Mozilla Firefox and installed the plugin Adblock Plus
DYK [Did You Know] ? Firefox Campus Edition
Comments : Leave a Comment »
Categories : 0p€N$0uRc€, firefox, Mis¢
my gallery
4 09 2007Comments : 1 Comment »
Categories : Lif€ @T IIIT, Mis¢, My Lif€, N€W$
my new homepage ..
4 09 2007http://students.iiit.ac.in/~sairam/n/ [ Still in Beta ]
wrote up a new webpage/homepage , have to do some changes.. purely html,css,js only php for saving feedback ( someone tell me if I can do it in html
)
btw, feedback section is working ! feedback is a must !
got a li’l busywith some flashy thing
will write about it soon
.
Comments : Leave a Comment »
Categories : Mis¢
Qt saved the day
15 06 2007It all started when I needed to port a small code written in Image Magick/C++ [working in FC5] need to be ported to FC2 {Fedora Core 2}. With the difference in the version of the Magick++ library, I could not even compile it. It was a web based project, so I tried to write it in PHP and the size of the images are some what bigj around the order of 3000×2000 pixels. In PHP we needed to allocate memory seperately . We needed to set around 100MB . If 4 or more instances of the program runs, think, how your machine will be doing ? { If its a server it would do fine }. So, the last alternative, Qt, THE Qt ( from trolltech ). With Qt, the problem was solved in minutes.
In PHP you set the memory limit by
ini_set ( 'memory_limit' , '15M' ) ;
In Qt-3, if you wanna do some image manipulation the format will be something similar.
#include <qappliction.h>
#include <qimage.h>
int main ( int argc , char* argv[ ] ) {
QImage srcimg("source.jpg");
QImage dest;
// Do operations on srcimg and save to dest
dest.save("destimg.jpg","JPG");
}
and you are done. Qt is the best . A lucid reason is because of how the documentation is made and kept.
An intresting site to check out » http://labs.trolltech.com/blogs/
Comments : Leave a Comment »
Categories : Mis¢
the day started with carroms
14 06 2007It was June 14, 2007. I was woken up by a phone call from `Campus Connect`. After I kept my phone down, I saw Meka Manoj. Then so, I thought my day’s gonna start with carroms
Yes it was. We agreed to play not more than 4 rounds.
The game started. As usual, the board was in bad condition[dirty weather X-( ]. I recalled the game that I played the previous night , the funny thing was , we played the game without a striker. It was Praveen’s idea of playing with another coin [ the black red coin ] {as there was no striker present}
. I played quite well today . I saw the same expression on Manoj’s face which says ` That was sheer damn luck ! ` . People including Pramod P , Nithin M, Pramodh, Sandeep C, etc… [ people who play carroms in OBH ] gave that expression one time or the other. We played around 5-6 boards and we played almost at equal levels
. I was happy when I put my last coin on the last board I played.
It was drizzling , the ENV was cool and pleasent until I got the thought of ` where to eat now ? ` . As it was raining we [ I , GBR ] have no other option except the mess. I am a bit eager to know what all might happen today
Comments : 1 Comment »
Categories : Mis¢
2nd Rank in Google [search?q=sairam blog]
13 06 2007I am thankful to google for giving me 2nd rank for q=sairam blog
http://www.google.com/search?q=sai+ram+blog
P.S. : G00g|€ R0¢k$ !
Comments : Leave a Comment »
Categories : G00g|€, Mis¢, My Lif€
10th Rank in Google [search?q=sairam]
13 06 2007I am thankful to google for giving me a rank 10 for q=sairam
http://www.google.com/search?q=sairam
P.S. : Google Rocks !
Comments : Leave a Comment »
Categories : G00g|€, Mis¢, My Lif€, Random Post
The Dinner
13 06 2007It was 13th of June. There was a meeting in the evening, and I had show some improvements in the Tool. It was 10:15 in the morning. I just woke up from bed , and as usual I was browsing through slashdot, lifehacker and other sites. Again re-started using Google Reader. The last feed I added into the Google Reader was the RSS which Google Reader itself provides
. So, I have the list of all the items I am reading sorted according to time.
The time Google Reader shows us is the time at which it had crawled that page and at which it gets the content.
Went to MuRaL at 05:00 pm after the meeting and had a little bit of chat with Shashank and Pramod P and decided to go to Anupama. In the hotel, we had `Veg Canoto Soup `, then, Naans along with the mushroom * curry , and ended the dinner with Curd Rice [ which was actually very good ]. And later after coming back, went to the lab again. Had a great dinner after a long long time
. Returned back to room and at 01:30 am on 14th June [today] , played carroms till 03:30am.
Did some changes to my webpage(s) . Location » http://students.iiit.ac.in/~sairam/ . Now its cooler
Comments : Leave a Comment »
Categories : Lif€ @T IIIT, Mis¢, My Lif€
Bash Cuts
10 03 2007‘It would be great if I had all the short-cuts all at one place ‘ ram thought
. Starting with BASH ( Shell ) which many use… This list will be useful for people starting to use BASH.
Ctrl + A = Home Key = Move to start of line
Ctrl + E = End Key = Move to end of line
Ctrl + I = Tab Key = Auto complete
Ctrl + N = Down Arrow = Next Command
Ctrl + P = Up Arrow = Previous Command
Ctrl + M = Enter Key = Execute Command
Ctrl + O = Execute Command and restore the previous command.Ctrl + R = Reverse Search
Ctrl + S = Forward Search or Suspend # varies with terminal type.
Ctrl + Q = Release SuspendCtrl + U = Remove from start of line till position of cursor
Ctrl + K = Remove from position of cursor till end of line
Ctrl + H = Back Space
Ctrl + W = Remove one word [delimiter=space]
Ctrl + Y = Paste that was cut using Ctrl + U | Ctrl + WCtrl + L = Clear Screen
Ctrl + T = Swap the letters behind the cursor
Ctrl + F = Move one character forward
Ctrl + B = Move one charecter backwardCtrl + D = EOF / Logout / eXit (Oops !)
Ctrl + G = Bell
Ctrl + C = suspend a program
Ctrl + Z = stop a program [ works in a program whose parent is the bash shell ]
fg = bring the process / program to the foreground
bg = bring the process / program to the backgroundCtrl + J = Execute Command ~ Ctrl + M
Ctrl + X * 2 = toggle between position
Ctrl + V = Some one fill this !
Please add any more short-cuts. The list will be available at http://students.iiit.ac.in/~sairam/
Comments : Leave a Comment »
Categories : 0p€N$0uRc€, F€d0r@, Linux
blogging again
5 03 2007just trying to start blogging again
Comments : Leave a Comment »
Categories : Random Post
Vimming
4 09 2006Was coding, and got a different kind of doubt. If I want to search for 2 words both at a time, say, PrimeNo & TotalNo. I found out that oring the two will do it. But we have to escape the | . ` /PrimeNo\|TotalNo` in vim will do it.
Found a new vim trick
.
That was some time before and today , the 4th of September, found a nice one this time. What will you do if u have a link in your file that you are vimming [the file you opened using vim], What a normal person will do is he would copy the link and paste it in the browser, else, you can just go to that line containing the link and just say `gx` in escape mode, I found this accidentally when pressing :noh , got :no , and then it gave some aliases which are there by default, and this is one of it.
And also one thing about recording in vim, I tried to read about recording in ranta’s page, but I had a doubt when to use it,
and found a incrementer/decrementer in vim
, just go to a number and press Ctrl+A [Escape Mode] will increase the number and Ctrl+X[Escape Mode] will decrement the number.
i recently knew that recording is easy,good,helpful ,briefly, press `qa` in Escape mode to start recording, this will store all the actions we do within the register `a`, do something and then `q` to stop recording, and executing the contents of the register `a` is by [count]@a .count is no. of times we want it to repeat that action which is commonly used in vim.
.vimrc
+set ai +set autoindent +set cindent +set ci +map <f5> $vypr|^vyphr|YPVr-jYpVr-j
thinking of writing some pages on pdf/swf/algos
.Jus writing them as found them and may come in handy sometimes.
Comments : Leave a Comment »
Categories : 0p€N$0uRc€, tUtori@L$, vim
vim shorties
14 08 2006I made up a list of vim commands I use , I wrote down the list but did not sort them out.
Also an Advanced Vim Tutorial can be found here written by smr , his homepage @T smr.co.in .
Also the list can be found @T http://students.iiit.ac.in/~sairam/tutorial/Vim.txt .
vim Shortcuts &| Small Codes
———————————————h->left
j->down
k->up
l->right
k
h l
jCtrl+N &| Ctrl+P for word Completion
:s/old/new/ for replacing in that line only,
:%s/old/new/g for replacing in the whole text.
:23,84s/old/new/ for replacing the text from lines 23 to 84.
:vsplit | :vs for vertical splitting,
:split for splitting horizontally,
:!cmd to execute a bash command.
Ctrl+G to show the file status.
Ctrl+[ for Escape mode.
i for insert mode.
I for insert mode, but changing the cursor to the start of the line.
R for Replace mode.
Ins for Insert/Replace Mode.
/searchword for searching from top to bottom
?searchword for searching from bottom to top
n for next match of the string
N for previous match of the string
/searchword\c for case-insensitivity.
:w to save
:q to quit
== :wq = ZZ to save and quit.
:X for encrypting in vim and only vim can decrypt it.
$ -> End of line,
^ -> Start of line,
+ -> for going a line down,
- -> for going a line up.
G -> for going to the end of file,
gg -> for going to the start of file,
:23 | 23G -> goes to the 23rd Line,
yy -> yanking,
dd-> deleting,
p -> paste below the current line.
P-> paste above the current line,
J -> to join this line and the next line,
% @ } or { or ) or ( for finding their partner,
O -> insert a line above the present line,
0-> insert a line below the present line,
~ -> for changing the case of a letter.
cw-> delete from cursor position to end of word.
C-> Change to end of line.
cc -> delete from cursor position to the end of the line.
:a -> to apply a function|command to all its windows,
a -> start editing after the curr position of the cursor.
:r filename -> prints the file withe name filename at the curr cursor position.
u -> undo
Ctrl+R ->Redo
Ctrl+e to scroll down withe cursor position fixed until it is in view.
Ctrl+y to scroll up withe cursor position fixed until it is in view.
Ctrl+d to scroll down half a page
Ctrl+u to scroll up half a page.
Ctrl+f to scroll down a page,
Ctrl+B to scroll upwards a page,
V -> to select an area horizontally & vertically and apply some function on it.
Ctrl+V to select area vertically & horizontally and apply a function on it,
x-> delete charecter under cursor,
X-> delete charecter before cursor,
d$ -> delete till end of line,
5dw -> delete 5 words.
<no>command -> execute it <no> times,
Ctrl+w + Ctrl+w -> to shift between windows in splitted conditions,
Ctrl+w + Ctrl+r -> to reverse the positions of the windows,
Ctrl+w + Direction Key to go to that window.
Ctrl+w + Ctrl+q -> to quit that window.
* on a word searches for all occurances of that particular word.
Ctrl+y in a line to copy charecters from the above line.
H-> goto top of screen,
L -> goto bottom of screen,
rx-> replace charecter with x
A -> Start Inserting @T end of line.
:f filename -> change current file to filename
” vim: fdm=marker fdl=0 –> @T the end of a vim file applies these settings to that file. It folds with folding marker.
Comments : 1 Comment »
Categories : Linux, tUtori@L$, vim
blogging again
13 08 2006Thought it was the time to start blog again, and so started over again, a fresh blog here @T http://sairamkunala.wordpress.com. Its like starting a fresh life again on the internet, and directly entering into the bl0gg€r$’ w0rld.
Thought of writing about Vim 7.0 release can be found @T http://vim.sf.net.
I think this time, I will hold on to this blog, and writeup p0$t$.
Comments : Comments Off
Categories : Mis¢


