Open new files in existing Gvim 04-08-2011 at 12:52:14 If you use the Linux/Gnome file manager Nautilus for file navigation, and often open files in gvim, then this trick is for you.
With a few simple tricks you can easily change files to be opened in an existing Gvim window if it already exists.

First step is to copy your existing Gvim shortcut so you have an alternative to the normal one.
This is done by the following:

cd ~/.local/share/applications
cp gvim.desktop gvim-existing.desktop

Next open the file and make sure the contents looks like this:
[Desktop Entry]
Encoding=UTF-8
Name=GVim Text Editor (Existing)
Comment=Edit text files in existing vim
Exec=gvim --remote-silent %F
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/vim.svg
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true

Finally you open nautilus and find one of the file you would normally edit in Gvim.
Right-click the file and select "Open with" ->"Other application". In the list of files you simply select the one called "GVim Text Editor (Existing)" and make sure to put a checkmark in the "Remember this application for ...."

Now whenever you open a file of that type, it will look for a running gvim and open the file in that one. If no gvim is running, then it will just start in a new instance as normal.


Permanent link: http://www.schulz.dk/en/blog/blogarchive/119
Add Comment
My second Vim book have been released 03-05-2010 at 09:23:32 Back in 2007 I released my first book about the Vim editor
Today I can announce that my second vim book have been released. You can find it at the publishers site here

Book cover The second book is an update to the previous book. It now covers the latest version of Vim (v.7.2) and contains even more tricks on how to boost your productivity when using the Vim editor.
You can buy the book in both paperback and e-book edition from the publishers homepage.

Book info:
Language : English
Paperback : 244 pages [ 235mm x 191mm ]
Release Date : April 2010
ISBN : 1849510504
ISBN 13 : 978-1-849510-50-9
Author(s) : Kim Schulz

Permanent link: http://www.schulz.dk/en/blog/blogarchive/118
Add Comment (6 comments)
Android DevPhone1 available - but not for all developers 09-12-2008 at 08:26:03 Last weekend Google finally announced that they have made their first public Android development phone available to everyone registered as an Android developer. Even though it is basically an unlocked version of the HTC G1 (not exactly a beauty) I still decided to order one. But apprantly that is not possible!
It turn out that Google only ships the phone to a very limited list of countrys - Denmark not included. This is not something I have seen mentioned on any of the announcements coming from Google and I find this choice quite strange (especially as we have quite a few Android developers in Denmark).
Fortunately my company have an office in the UK and I could order the phone to the office there instead.
The phone itself is quite cheep ($399) but what a chock I got when I saw the shipping bill - freaking $171 in order to ship 1(ONE!!) phone from the US to the UK. This was the only shipping option available and it was some UPS with tracking option.
I am seriously considering to cancel my order as I find this shipping price close to ridiculous.
It this just Googles way of saying "hey we only want large companies to work on Android apps?, Screw all you small developers out there"?
By the way! only one phoe can be ordered at a time

Permanent link: http://www.schulz.dk/en/blog/blogarchive/117
Add Comment (4 comments)
GScroll - why the HTC Touch Diamond is still superior 09-12-2008 at 08:06:24 touchpad and app-launcher using the button area of the HTC diamond....Brilliant



Permanent link: http://www.schulz.dk/en/blog/blogarchive/116
Add Comment (4 comments)
So what is up with Google FriendConnect and Facebook Connect? 06-12-2008 at 15:59:48 Last Thursday Facebook (re) announced their new Single-Sign-On (SSO) called Facebook Connect (it was previously announced to developers back in May).
Google have had a similar service called Google FriendConnect in beta for quite a while and of cause they could not resist the temptation and go release their service to the public just hours after the Facebook Connect service was announced.
But what is actually the difference between the two services?

Facebook Connect
Facebook connect is meant to be a service where private and commercial sites can let its visitors login with their facebook credentials instead of creating a new user on the page (e.g. a for a forum). Info and activities the user have on the website can be shared with the persons facebook friends and they can be invited to join as well.
As with all Facebook related development, it involves a mixture of PHP and Javascript and hence the webmaster must know how to use these in order to integrate Facebook Connect with their site. A good example page including source code is however available to make it easier for the webmaster.

Google FriendConnect
Google connect builds on top of the basic concepts from OpenSocial and Google Gadgets. Its functionality is currently still limited to a few "gadgets" like :
  • a "members gadget - let people "join" your site, see what other members the page have, read their info and become friends with them as well. Friends from all OpenSocial supporting services(e.g. AIM, Plaxo, Orkut, Google, etc) can be invited to be friends (and their credentials can be used to login).
  • a "Rating gadget" where the visitors can rate and comment on whatever the gadget is bound to (site, blog post, image, video etc).
  • a "Wall gadget" where visitors can write comments, have simple "chats" etc.
  • A "custom Gadget" where the webmaster simply gives a link to an OpenSocial gadget (xml file) or a Google Gadget from iGoogle and then this will be shown on the page.
I am sure that many more will be developed in the near future (As will all other "Google").
As with the Google Gadgets, it has been made very simple for the developer to integrate the Gadgets into a webpage. A few clicks and selection of the FriendConnect page and a snippet of javascript/html is generated. This code is simply pasted into the place on the site where the webmaster wants it to be. And that's it! Now the page visistors can enjoy the Gadget on the page.

I will take a more thorough look at the two services in the upcoming weeks. Until then, please feel free to add a comment and join my google FriendConnet service on my frontpage.

Permanent link: http://www.schulz.dk/en/blog/blogarchive/115
Add Comment (4 comments)
Pacman, Site design and Google FriendConnect 03-12-2008 at 17:28:29 It has been awhile since I last wrote here on the blog. A lot has happened and I will try to summarize some of it here.
Pacman
A lot of people have complained about pacman being down all the time. I have been working hard to keep it up but it is simply so popular that even the dedicated server that hosts it now cannot keep it up all the time. I am working on getting some redundant server setup for this, but keep in mind that it is not free to have servers like this running for a free online game.
You can support me by donating through Paypal (button below) or by buying my Vim book
$


New Site Design
I have had the same boring design on this page for years now and it was about time to find a new one. The new design is one I have adapted from a mix of several different free templates on the web (yes I haven't had time to do an entire design myself). I still need to translate some of the pages and I also have tons of new stuff laying around that I need to add to the page.
Most of the basic stuff like Blog and games are back online.

Google FriendConnect
Google have added a new feature to their portfolio called FriendConnect. I have been playing around with it for a bit on my frontpage and plan to use it even more if I can find appropriate places for it.
So far I have added a "friend list" and a comment box. I would encourage you to sign up and take it for a spin. It looks like it has a lot of nice features and more are coming soon. Feel free to add a comment to my frontpage or add yourself as a friend.

Permanent link: http://www.schulz.dk/en/blog/blogarchive/114
Add Comment (3 comments)
Pacman Game down 28-08-2008 at 10:02:39 I am currently having some hardware problems with the server that hosts the Pacman game. This means that the Game is down right now (have been for some days now) and probably wont be able to get back up until next weekend.
Sorry for this, but I will do my best to get it back up as soon as possible!



Permanent link: http://www.schulz.dk/en/blog/blogarchive/113
Add Comment (29 comments)
GottaBeMobile.com giving away a ton og gadgets 02-07-2008 at 12:49:15 HO HO HO It's Christmas time at GottaBeMobile.com

The good guys over at gottaBeMobile.com are giving away a lot of gadgets and swag to users that are active on their blog comments, forum or by promoting their site.
read more about the contest here: http://www.gottabemobile.com/Ho+Ho+Ho+It+Is+Christmas+Time+At+GottaBeMobilecom.aspx

Permanent link: http://www.schulz.dk/en/blog/blogarchive/112
Add Comment (4 comments)
Guitar Hero 3 as a gadget - rock your world! 01-05-2008 at 08:35:40 I looooove the Guitar hero games. Not because of the fantastic game play or graphichs, but simply because it it funny, entertaining and a great party-starter. Oh and the music is quite cool too.

Now you can play Guitar Hero 3 online in a small widget. It is really fun when you get the hang of the controls: use 1-5 to control the strings and enter-key to use the pick (press it to do any actual playing while holding down the correct string). Backspace is the vibrato.
Here it is. Enjoy!


Hope to have it ready as a iGoogle gadget later next week.

Permanent link: http://www.schulz.dk/en/blog/blogarchive/111
Add Comment (3 comments)
Why is pacman so slow - here's why! 18-12-2007 at 17:09:25
Pacman - still going strong In the past few weeks the popular pacman google gadget has gone from slow to down to slow to now being back to near normal. I have received thousands of mails from people that wanted to know what happend to the game. Today I decided to tell why.
Since 1997 I have had my domain www.schulz.dk hosted at the same company. From the start I have paid for the "big package" with free disk space and free trafic. Since then the original (and really great) company, Image Scandinavia, has changed owners several times and over time the support and QoS has become worse and worse. First i became World Online, then Tiscali, then Tele2.
Tele2 is actually an ISP and their hosting is taken care of by the company uni2. Usually Uni2 have been known as one of the most reliable hosting sites in Denmark, but in my experience that isn't really correct. Over time my site was really slow and database access could sometimes give timeouts.
Recently Uni2 was aquired by TDC Hosting which is the hosting company of the largest tele and internet provider in Denmark.
Now things started breaking down since their admins apperently did not like the fact that my site was so popular.
One evening they suddenly changed the read-access bit on my pacman files without any prior warning.
I noticed that and thought it was a glitch in their system so I changed it back to normal. A few hours later, all my files were locked down by the evil "root".
I contacted their support and a guy there told me something along the lines of "sorry we cannot hos your file anymore, they are too demanding. We have to other customers to think of too".
How the h... can the largest hosting company in Denmark not handle my site. It's not that popular and we are only talking 75-100Million hits/month giving around 800gb-1tb/md traffic.
I would think that this kind of hosting would be a minor thing to them.

The solution
In the end, I could not persuade them to host the pacman game - however the rest of the site could stay if it "behaved well".
Fortunately I own my own small hosting company where I decided to place the pacman game on a separate server.
I started by setting it to be ready for extreme high load, but in the end I realized that the caching system, reversed proxy etc used up more system resources than the actual webserver load.
So in the end I moved the game to a small virtual server that runs as a 2ghz machine with 2gb ram. The avg load is around 1.2 (unix load) and less than half of the ram is in use.
Now I ask myself even more why the large hosting company could not handle this kind of load. Seems to me like somebody in their admin team should take a look at their setup.
Final Note
I would like to thank everyone that have supported me by sending friendly mails and game ideas. Also a big thanks to everyone that plays this game and makes it one of the most popular games on Google ever.


Permanent link: http://www.schulz.dk/en/blog/blogarchive/110
Add Comment (60 comments)
Songza, The next big thing - or is it? 17-11-2007 at 12:16:33 A little more than a week ago, Aza Raskin announced his new brainchild Songza. A brand new search engine for music. The users can easily find and listen to the music, but they cant download it - or can they?
Geat userinterface
The songza userinterface is great and simple (KISS consept at its best). You search for a song, select the song in the result list and click it. Then a nice little navigations box shows up where you can select to play, share, rate or add to playlist. Simple and easy. After selecting play, the music starts playing.
Here are a bit of screenshots.




The idea is briliant and you can find pretty much any song you like (I did some weird searches and got results).
This made me think! where do they get their songs from? In many cases the songs sounded like live recordings or just plain bad recordings so I was sure that it wasnt top-quality music they have gotten from the music industry
I couldnt find much info about this, so I decided to do a bit of digging into how it worked.

The music is not downloadable - yeah Right!
I fired up firefox and started the firebug extension to see what actually happened when I started playing a song. The "net" tab is quite nice to show what actually gets transfered over to my computer.
One thing caught my eye right away. Between the gets of images, flash and js files I suddently saw a couple of links to youtube. Could it be that simple? Did a couple of more searched and now also saw a couple of links to google-video.

Aha! I looked at what I had gotten from youtube ant noticed that it was the usual "get_video" request that the youtube player uses to get the flv file containing the video.
so thats where they got their music from. It is actually just the video it plays without showing the image. This also explains why the sound was often so bad or like live recordings (there s quite a few live recordings around on youtube).
I copied the link from the youtube "get_video" link from firebug and into another firefox window. I was then asked whether I wanted to download the file or play it with my media player (Gnome Totem). I selected the last option and this is what I saw:


The music video of dire straits that I just listened to on Songza.
Nice and easy. The best thing is that the Songza interface is a lot easier to find music with than the one in youtube and google-video.
In other words, this might not be such a bad idea after all - even though it still just brings us what youtube and friends does.
I am pretty sure though that within a couple of weeks, firefox extensions like downloadhelper will provide support for downloading music (well videos) from songza.

Permanent link: http://www.schulz.dk/en/blog/blogarchive/109
Add Comment (5 comments)
New Google Game Gadget: Rainbow Web 23-09-2007 at 21:28:39 Today I can proudly present a new Google Game gadget I have created together with the guys from Gamezebo.

The game is called Rainbow web and is an addicting puzzle game. You have to solve the color and letter puzzles before the time runs out, so hurry up!
You can add the game to your iGoogle page here
Happy gaming!

Permanent link: http://www.schulz.dk/en/blog/blogarchive/108
Add Comment (12 comments)
Pacman - Now in multiple languages 23-09-2007 at 21:21:25 In a joint effort with the flash developer Paul Neave I have now made it possible to play the good old pacman game in not one, not two, but five different languages.
This means that you can now enjoy the pacman game in French, English, Spanish, Portuguese and Danish.
You simply select the language you want to use in the gadget preferences. You find it in the little arrow in the top-right corner of the gadget.



Permanent link: http://www.schulz.dk/en/blog/blogarchive/107
Add Comment (106 comments)
OOXML is NOT an open ISO standard 04-09-2007 at 19:30:01 A ballot on whether to publish the draft standard ISO/IEC DIS 29500, Information technology – Office Open XML file formats, as an International Standard by ISO (International Organization for Standardization) and IEC (International Electrotechnical Commission) has not achieved the required number of votes for approval.
Today is a great day for Information freedom. The ballot on whether Microsofts Closed document format OOXML could gain Open ISO standard certification resulted in a NO!
This means that ODF is still the only real open ISO Office document format out there (which is what I have meant all the time.

Nice work to all of you that helped informing the world about why OOXML should actually be called COXML and why the world would only need one ISO standarized Office document format.

Read the full press release from ISO here:
http://www.iso.org/iso/newsandmedia/pressrelease.htm?refid=Ref1070

Unfortunately MS can still try to get ISO to vote yes, if it changes the things wrong with the format .

Permanent link: http://www.schulz.dk/en/blog/blogarchive/106
Add Comment (1 comments)
Updated Fish Tycoon Gadget 10-08-2007 at 21:41:10 Just a short update. Some users has complained that it was annoying that the Fish Tycoon game played music when started (actually even before the game has started). This is now changed in the came so from now on the game is muted as a default. Let me know if this is not ok.
fishtycoon

Permanent link: http://www.schulz.dk/en/blog/blogarchive/105
Add Comment (25 comments)
Reading a book - not writing it. 10-08-2007 at 20:27:46 After I have been spending most of my time writing my book, it is now time for me to sit back and relax with a bit of reading instead.
For that purpose, I have gotten a bunch of books from my Publisher. I have already read the first one which I hope to do a short review of later on. The next book I am planning to read is Building Telephony Systems With Asterisk which I have been wanting to read more about for awhile. But look out for the reviews very soon.

In other news:
I have started a new photo blog called Colors of Black. It will contain some of all the pictures I will take (or have taken already) - some good, some bad and some really ugly ones :-) Take a look for yourself.



Permanent link: http://www.schulz.dk/en/blog/blogarchive/104
Add Comment (2 comments)

This Blog

This blog is an entirely personal project, unrelated to my current, former or future employers. Anything I write here should not in any way be construed as legal advice, recommendations or as anyone's opinion but my own. If in doubt, contact me. Thanks.

RSS feed

Syndicate this blog:
RSS2 | ATOM