Monday, June 25, 2012
code syntax highlighting in blog posts
Problem: Need to syntax highlight the code in the blog posts (to improve it's readability).
Solution: github's gist (http://gist.github.com/)
OK now what's the story? I tried to find some simple solution for me to be used in the blogger.com in the dynamic templates.
I've found: gist.
As one of the quite popular proposals on stackoverflow said :
http://stackoverflow.com/questions/679189/formatting-code-snippets-for-blogging-on-blogger
What is gist?
(Copy pasted from their site) "Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository."
Sounds good. But when trying it didn't work for the blogger and dynamic templates.
After some googling found following post:
http://blog.moski.me/2012/01/gist-with-bloggers-dynamic-views.html
and that worked for me!
So since from now on, you can expect some nicely highlighted code snippets in my posts :)
Repost new blog notification to social networks
Problem: How to automatically send status notifications on the new blog posts on blogger to google+, facebook and twitter?
Solution: Two step approach worked for me:
1. use official blogger to google+ integration (to post to google+)
2. use "+Rob Mcgee" (to repost from Google+ to facebook and twitter)
How to achieve it? Go on reading.
Official integration blogger to google+.
Follow the instructions here:
http://support.google.com/blogger/bin/answer.py?hl=en&answer=1752748
Or more specifically, to merge the profiles do so here:
http://www.blogger.com/switch-profile.g
Google+ to Facebook and Twitter reposting
Use the site with the official instructions: http://gplus.sagg.im/
I've found this approach on:
http://lifehacker.com/5868019/how-can-i-post-to-facebook-twitter-andor-google%252B-all-at-the-same-time
In fact I need to test it somewhere, so if you see this post in all these 3, it should be working fine.
Let's see :)
Solution: Two step approach worked for me:
1. use official blogger to google+ integration (to post to google+)
2. use "+Rob Mcgee" (to repost from Google+ to facebook and twitter)
How to achieve it? Go on reading.
Official integration blogger to google+.
Follow the instructions here:
http://support.google.com/blogger/bin/answer.py?hl=en&answer=1752748
Or more specifically, to merge the profiles do so here:
http://www.blogger.com/switch-profile.g
Google+ to Facebook and Twitter reposting
Use the site with the official instructions: http://gplus.sagg.im/
I've found this approach on:
http://lifehacker.com/5868019/how-can-i-post-to-facebook-twitter-andor-google%252B-all-at-the-same-time
In fact I need to test it somewhere, so if you see this post in all these 3, it should be working fine.
Let's see :)
Saturday, May 5, 2012
me-tv 1.4.x built from source on xubuntu 11.10
Q: How to run the latest me-tv 1.4.0.9 on xubuntu 11.10 (64bit)?
For solution, go on reading :)
Motivation for me-tv
I'm the user of me-tv as for me it's the most comfortable solution of watching dvb-t on linux. It has simple ui showing me all the needed in one screen:
- video in the upper part as well as
- per channel schedule shown bellow.
For me it means no time wasted in menu clicking / new dialogs / ...
Motivation for latest version
vlc backend support (as opposed to xine only backend support in 1.3.x versions)
Status research
As in repos there is still 1.3.x version available and I'd like to use the latest one, let's do some research.
Q: What is the latest version?
Short A: Currently it's 1.4.x
Long A: Based on this link: https://answers.launchpad.net/me-tv/+question/182263 there is new maintainer (original is gone) - Frédéric Côté (frederic-cote) and he restarts development of me-tv in 1.4.x branch that seems to be merge of stable 1.3 (xine based) and 2.0.x (xine/vlc/gstreamer based). The good news here is the usage of vlc as backend. Finally! :)
UPDATE:
hey, after writing this post, I've found that there exists me-tv development PPA: https://launchpad.net/~me-tv-development/+archive/ppa
And for the that's my choice. For those still interested in compiling from source, go on reading.
OK, let's do the job.
Installation steps of me-tv 1.4.x (working for me):
1. download latest stable tgz archive, for me it was https://launchpad.net/me-tv/1.4/1.4.0/+download/me-tv-1.4.0.9.tar.gz (however link is on the main page, check for the latest one: https://launchpad.net/me-tv)
2. unpack it and get in dir
3. install dependencies (I installed all the dependencies listed on: https://answers.launchpad.net/me-tv/+faq/352)
4. prepare / start compile/install
5. now it's time to cross fingers, try to start it:
got error:
2012-05-05 08:19:06: Me TV Server 1.4.0.9 started
2012-05-05 08:19:06: An unhandled exception was generated
2012-05-05 08:19:06: Error: The Me TV database version does not match the Me TV server version.
OK, seems we need to cleanup configuration (as I've used on the same PC also older version):
mv ~/.me-tv/ ~/.me-tv_backup
it didn't help => as suggested here (https://bugs.launchpad.net/me-tv/+bug/886367) I did also:
mv ~/.local/share/me-tv ~/.local/share/me-tv_backup
one more try:
For solution, go on reading :)
Motivation for me-tv
I'm the user of me-tv as for me it's the most comfortable solution of watching dvb-t on linux. It has simple ui showing me all the needed in one screen:
- video in the upper part as well as
- per channel schedule shown bellow.
For me it means no time wasted in menu clicking / new dialogs / ...
Motivation for latest version
vlc backend support (as opposed to xine only backend support in 1.3.x versions)
Status research
As in repos there is still 1.3.x version available and I'd like to use the latest one, let's do some research.
Q: What is the latest version?
Short A: Currently it's 1.4.x
Long A: Based on this link: https://answers.launchpad.net/me-tv/+question/182263 there is new maintainer (original is gone) - Frédéric Côté (frederic-cote) and he restarts development of me-tv in 1.4.x branch that seems to be merge of stable 1.3 (xine based) and 2.0.x (xine/vlc/gstreamer based). The good news here is the usage of vlc as backend. Finally! :)
UPDATE:
hey, after writing this post, I've found that there exists me-tv development PPA: https://launchpad.net/~me-tv-development/+archive/ppa
And for the that's my choice. For those still interested in compiling from source, go on reading.
OK, let's do the job.
Installation steps of me-tv 1.4.x (working for me):
1. download latest stable tgz archive, for me it was https://launchpad.net/me-tv/1.4/1.4.0/+download/me-tv-1.4.0.9.tar.gz (however link is on the main page, check for the latest one: https://launchpad.net/me-tv)
2. unpack it and get in dir
3. install dependencies (I installed all the dependencies listed on: https://answers.launchpad.net/me-tv/+faq/352)
sudo apt-get install build-essential gettext debhelper autotools-dev libxml-parser-perl pkg-config devscripts libtool intltool libgnomemm-2.6-dev libgnomeuimm- 2.6-dev libgtkmm-2.4-dev libgnet-dev libsqlite3-dev libvlc-dev libxine-dev libdbus-glib-1-dev libunique-dev
moreover I had to install these:
sudo apt-get install libxml++2.6-2 libxml++2.6-dev gnome-common libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev
4. prepare / start compile/install
./autogen.sh
./configure --prefix=~/Desktop/apps/me-tv_1.4
make
make install5. now it's time to cross fingers, try to start it:
cd ~/Desktop/apps/me-tv_1.4/bin/
./me-tv-server
got error:
2012-05-05 08:19:06: Me TV Server 1.4.0.9 started
2012-05-05 08:19:06: An unhandled exception was generated
2012-05-05 08:19:06: Error: The Me TV database version does not match the Me TV server version.
OK, seems we need to cleanup configuration (as I've used on the same PC also older version):
mv ~/.me-tv/ ~/.me-tv_backup
it didn't help => as suggested here (https://bugs.launchpad.net/me-tv/+bug/886367) I did also:
mv ~/.local/share/me-tv ~/.local/share/me-tv_backup
one more try:
./me-tv-server
no error
./me-tv-client
we're done! :)
OK, now let's make sure no confusion with the older version happens:
sudo apt-get remove me-tv
There are still things to be fixed, like server auto start as well as integration with UI, however these I'd await from upstream.
For me it's worth using 1.4.x version and that my cpu doesn't need to be burning on 100% with xine any more. Cool!
OK, now let's make sure no confusion with the older version happens:
sudo apt-get remove me-tv
There are still things to be fixed, like server auto start as well as integration with UI, however these I'd await from upstream.
For me it's worth using 1.4.x version and that my cpu doesn't need to be burning on 100% with xine any more. Cool!
Tuesday, May 1, 2012
music sync for android on linux
Q: What are the options for managing music on android based device on linux?
A: Banshee, Clementine, ...
First make sure device is connected via usb cable :)
For Banshee:
- start banshee
- import music via: right click (and hold) Libraries -> Music and choose Import Media -> Folders -> Choose Folders (please note that it won't scan the music if it's too deep in subdirs, for me it worked only up to level artist/album/songs)
- wait for scan to complete
- as you connected the device, you should see it in Devices -> [Device name] -> Music
- drag and drop anything from Libraries -> Music to Devices -> [Device name] -> Music
- moreover you can manage (remove,...) your library on the device by activating Devices -> [Device name] -> Music and doing the needed
For Clementine:
- start clementine
- import music via menu: Tools -> Preferences -> Music Library
- choose Add new folder
- wait for scan to complete
- as you connected the device, you should see it in Devices -> [Device name]
- in Library right click on album and choose Copy to device
- choose Destination (your [Device name]) and click OK
- moreover you can manage (remove,...) your library on the device by activating Devices -> [Device name] and doing the needed
Then sync happens, whenever device is disconnected you're done
A: Banshee, Clementine, ...
First make sure device is connected via usb cable :)
For Banshee:
- start banshee
- import music via: right click (and hold) Libraries -> Music and choose Import Media -> Folders -> Choose Folders (please note that it won't scan the music if it's too deep in subdirs, for me it worked only up to level artist/album/songs)
- wait for scan to complete
- as you connected the device, you should see it in Devices -> [Device name] -> Music
- drag and drop anything from Libraries -> Music to Devices -> [Device name] -> Music
- moreover you can manage (remove,...) your library on the device by activating Devices -> [Device name] -> Music and doing the needed
For Clementine:
- start clementine
- import music via menu: Tools -> Preferences -> Music Library
- choose Add new folder
- wait for scan to complete
- as you connected the device, you should see it in Devices -> [Device name]
- in Library right click on album and choose Copy to device
- choose Destination (your [Device name]) and click OK
- moreover you can manage (remove,...) your library on the device by activating Devices -> [Device name] and doing the needed
Then sync happens, whenever device is disconnected you're done
phone contacts migration - Sony Ericsson W580i to Samsung Galaxy Y
Q: What is the simplest way to get all the contacts from Sony Ericsson W580i to Samsung Galaxy Y?
A: Send them via bluetooth.
I've seen various ways to achieve this on web, however the most of them are via some PC tools. This seems to be at least for me unnecessary. I've found the answer in the comments of one that kind of PC tool based approach.
When trying to migrate all of my contacts I just needed to copy them via bluetooth:
- in w580i went to contacts
- chose More -> Options -> Advanced -> Send all contacts -> Via Bloetooth
- found the target device, sent and voila! done :)
A: Send them via bluetooth.
I've seen various ways to achieve this on web, however the most of them are via some PC tools. This seems to be at least for me unnecessary. I've found the answer in the comments of one that kind of PC tool based approach.
When trying to migrate all of my contacts I just needed to copy them via bluetooth:
- in w580i went to contacts
- chose More -> Options -> Advanced -> Send all contacts -> Via Bloetooth
- found the target device, sent and voila! done :)
xml anonymization
You might already have been in the situation, where you needed to ask very specific question at some public forum/mailing list that is however coupled with particular XML content.
And possibly the content should not be seen by public.
I needed to, so I checked the options.
How can I anonymize xml?
Google pointed me to - xmlanonymizer (http://code.google.com/p/xmlanonymizer/)
After some stuggling I even found the way to use it.
To get the very latest version, you need to import svn hosted source and build yourself:
- import svn project to eclipse (http://xmlanonymizer.googlecode.com/svn/trunk/), I imported it as Java project afterwards
- Configure -> Convert to Maven project (you need m2e plugin in eclipse installed to do this)
- build as maven project (for example via cli: mvn clean install)
- anonymize your content:
java -jar target/XMLAnonymizer-0.0.2-SNAPSHOT.jar in.xml -outfile=out.xml -overwrite=true
where in.xml is the xml you need to anonymize and out.xml is the output file
OK, so now you (should) have it running.
As per default only xml text and argument values are anonymized
But what if you need to go a step further?
I summed up my needs in the bug report there (http://code.google.com/p/xmlanonymizer/issues/detail?id=1):
- I'd need to have also element names anonymized
- I'd like to do anonymization via random digit/char rather than next digit/char in the sequence (as for the xml with maaaaany elements I came to situation, that there were no more element names left => endless loop)
- I'd like to keep anonymized character case sensitivity (lower/upper case)
and finally attached the patch, as the implementation was quite easy
And possibly the content should not be seen by public.
I needed to, so I checked the options.
How can I anonymize xml?
Google pointed me to - xmlanonymizer (http://code.google.com/p/xmlanonymizer/)
After some stuggling I even found the way to use it.
To get the very latest version, you need to import svn hosted source and build yourself:
- import svn project to eclipse (http://xmlanonymizer.googlecode.com/svn/trunk/), I imported it as Java project afterwards
- Configure -> Convert to Maven project (you need m2e plugin in eclipse installed to do this)
- build as maven project (for example via cli: mvn clean install)
- anonymize your content:
java -jar target/XMLAnonymizer-0.0.2-SNAPSHOT.jar in.xml -outfile=out.xml -overwrite=true
where in.xml is the xml you need to anonymize and out.xml is the output file
OK, so now you (should) have it running.
As per default only xml text and argument values are anonymized
But what if you need to go a step further?
I summed up my needs in the bug report there (http://code.google.com/p/xmlanonymizer/issues/detail?id=1):
- I'd need to have also element names anonymized
- I'd like to do anonymization via random digit/char rather than next digit/char in the sequence (as for the xml with maaaaany elements I came to situation, that there were no more element names left => endless loop)
- I'd like to keep anonymized character case sensitivity (lower/upper case)
and finally attached the patch, as the implementation was quite easy
Monday, March 5, 2012
The mixed feelings of the Joe the bug reporter
To report or not to report, that's the question. Bad start? Well, right it is :)
Today I decided to spread some feelings on bug reporting.
Don't expect some rules list or checklist for the perfect process. I think there are many other places that perfectly cover that.
This post doesn't even deal with those having bug reporting as a job. But rather those of us, who care about how comfortable they can live in the world of software (preferably free one).
No it's not to be one of those purely technical posts, but rather philosophical one. I think the title expresses it.
Bug reporting motivation
So what are the ideas I have on my mind when reporting a bug?
Sometimes I feel like a hero. Cause I'm the guy who found it, and moreover I'm the one who reported it.That matters, right?
This can be tricky as I might be so blinded by my motivation, that I don't even try to find if the bug is already reported and if so the heroic feeling disappears fast.
The most of the time, I can't wait to see the bug fixed, or at least some activity from the development community happening on it.
As for some reason I feel like: "Hey, this is the one that's the most important!" at least for me :).
OK, but is there something wrong with my expectations having too high? Probably not. The only person to get in bad mood is only me, anyway. If it didn't work the way expected.
What is the point then?
I think bug reporting, is just another way of communication. Moreover it's quite often a communication with the strange people you've never met and probably never talked to. Would you (or rather I) expect these guys to be completely focused on my statements considering them to be the top importance, if there are hundred others talking to them in parallel?
Moreover some of my requests might sound stupid or out of their focus.
None of the bugs I've ever reported included sponsoring or any other volunteer contribution :)
Why do I then expect 24/7 availability of project contributors for my ideas? Well not sure, but still I do :)
Probably the motivating part for the solvers can be if they simply care, or I'm not the only one facing an issue.
So based on all my previous experiences in bug reporting, I should try to keep my emotions as low as possible and deal on technical level.
Hey, but there aren't only the bad days.
From time to time, when you just report and forget, but keep notified, nice things happen.
I've experienced activity or even solution on some of my old timers (that can be even nostalgic) :)
Or things like this happen:
https://issues.apache.org/bugzilla/show_bug.cgi?id=52598
- the project maintainer expresses the situation on project clearly (in the Comment 1) => all my mis-expectations are gone :)
- but suddenly it's getting solved => hey! that was cool, I didn't expect, honestly.
In this place I'd like to express the big thanks to all those who care about bugs in their software and communicate the progress/or reality of the project to community.
And from the perspective of reporters, big thanks to those patient with the progress and cooperative or even proactive in solution.
So that's it for today.
Did anyone come this far in reading? No, I can't believe :)
Feel free to share your experiences in comments (or feel free not to :).
Today I decided to spread some feelings on bug reporting.
Don't expect some rules list or checklist for the perfect process. I think there are many other places that perfectly cover that.
This post doesn't even deal with those having bug reporting as a job. But rather those of us, who care about how comfortable they can live in the world of software (preferably free one).
No it's not to be one of those purely technical posts, but rather philosophical one. I think the title expresses it.
Bug reporting motivation
So what are the ideas I have on my mind when reporting a bug?
Sometimes I feel like a hero. Cause I'm the guy who found it, and moreover I'm the one who reported it.That matters, right?
This can be tricky as I might be so blinded by my motivation, that I don't even try to find if the bug is already reported and if so the heroic feeling disappears fast.
The most of the time, I can't wait to see the bug fixed, or at least some activity from the development community happening on it.
As for some reason I feel like: "Hey, this is the one that's the most important!" at least for me :).
OK, but is there something wrong with my expectations having too high? Probably not. The only person to get in bad mood is only me, anyway. If it didn't work the way expected.
What is the point then?
I think bug reporting, is just another way of communication. Moreover it's quite often a communication with the strange people you've never met and probably never talked to. Would you (or rather I) expect these guys to be completely focused on my statements considering them to be the top importance, if there are hundred others talking to them in parallel?
Moreover some of my requests might sound stupid or out of their focus.
None of the bugs I've ever reported included sponsoring or any other volunteer contribution :)
Why do I then expect 24/7 availability of project contributors for my ideas? Well not sure, but still I do :)
Probably the motivating part for the solvers can be if they simply care, or I'm not the only one facing an issue.
So based on all my previous experiences in bug reporting, I should try to keep my emotions as low as possible and deal on technical level.
Hey, but there aren't only the bad days.
From time to time, when you just report and forget, but keep notified, nice things happen.
I've experienced activity or even solution on some of my old timers (that can be even nostalgic) :)
Or things like this happen:
https://issues.apache.org/bugzilla/show_bug.cgi?id=52598
- the project maintainer expresses the situation on project clearly (in the Comment 1) => all my mis-expectations are gone :)
- but suddenly it's getting solved => hey! that was cool, I didn't expect, honestly.
In this place I'd like to express the big thanks to all those who care about bugs in their software and communicate the progress/or reality of the project to community.
And from the perspective of reporters, big thanks to those patient with the progress and cooperative or even proactive in solution.
So that's it for today.
Did anyone come this far in reading? No, I can't believe :)
Feel free to share your experiences in comments (or feel free not to :).
Subscribe to:
Posts (Atom)