As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label plugin. Show all posts

For a long time, Id wanted to make a screenshot like the following image, and I finally found plugin can help me, GIMP Tear-off plugin.

https://lh3.googleusercontent.com/-qjqkU2-VQjk/UP9-OppVYQI/AAAAAAAAEVI/J3SGuNh9Qq8/s640/gimp-tear-off-1.png

Example of Tear-off plugin

(screenshot edited from GIMP website)

Some blogs use this style of screenshot, jagged edges like a piece of papar torn off into two parts. You can doiit manually in GIMP to achieve the same effect, but that takes time. With Tear-off, its only a few clicks in the dialog as shown as follows.

To use this plugin, the only thing you really need to do is selecting the area you want to keep. Tear-off keeps selection and processes non-selected area to add jagged edges around the selection. You can choose how ragged the edge you want, add shadow and border. With little manipulation, you can have some highlighting effect like the following image.

https://lh4.googleusercontent.com/-rBN-utD4jfE/UP9-QLLIlGI/AAAAAAAAEVQ/Mq-4IPwVfDM/s640/gimp-tear-off-2.png

Example of Tear-off plugin

(screenshot edited from GIMP website)

The selection doesnt have to be rectangle as you can see from the image above. I used Tear-off twice and with brightness and contrast adjust plus mask editing for the fade-out effect at top and bottom of image. That makes the important part very stand-out and also keeps some context around selection.

Ive used Tear-off for screenshots for my posts. Next example uses first tear-off to highlight two rows, then second one to cut off unwanted rows between wanted area and the bottom row. I wanted to preserve the information in bottom row but not to highlight it since its not the primary focus.

If you have a screenshot is very long and you only need top and bottom area, here is how you do it. Select unwanted area, then inverse selection, apply tear-off, lastly, the zealous crop to compress the image. You will get a compact image like the following one.

The version of Tear-off I use is 0.2, more than two years old, for GIMP 2.6. The latest GIMP version is 2.8, I dont know if this plugin works in GIMP 2.8. Its licensed under the GPLv3, anyone can fix or improve this plugin.

Well, in about five years... long time.

I just saw this thread, Adobe drops Flash for Linux, except Chrome, I was like "Come on, Adobe, don't do this to Linux users!" at first. But after I read that page, I am sure that OP missed some things.

Google and Adobe partner for this PPAPI which will be used for future Flash Player version. For current NS Plugin API version of Flash, it will only have security updates for up to five years.

It does not say Adobe drop development for Linux and only make Flash work for Chrome. It's API switch, that has nothing to do with specific browser. Just, it happens Google is doing this new PPAPI.

As long as other browser starts to provide PPAPI, newer Flash will still work, or you will still have old NS Plugin API Flash for up to five years with only security updates. For other operating systems, non-PPAPI version of Flash will still be developed as before.

Of course, it may take time for other browser to provide PPAPI for plugins, but I am sure it wouldn't be long. Flash is a big demand, just think about you can't watch silly cats running, some developers soon will help to make PPAPI happened in other browser.

All of these will only start to take place after the release of 11.2, currently latest version is 11.1.102.62. According to roadmap, 11.2 is scheduled to be released in the first quarter of this year.

However, I didn't like this switch. I have same comment like the first comment of that Adobe blog post:

By Ron - 11:20 AM on February 22, 2012
Doesnt the NS Plugin API accomplish the same purpose?

If so, wouldnt it be better to work with Mozilla to fix the flaws in the NS Plugin API?

Or is there a non-technical rationale for creating a different API?

I don't know anything about NS Plugin API or PPAPI, but why not just fix it if there is a problem or lots of issues? Why not Google, Mozilla, Adobe, Microsoft, and Apple (sorry, Adobe, I know) work together if they really need a new API? Or is PPAPI already the case?

Anyway, I don't really care about the detail as long as I have regularly updated Flash, it doesn't matter to me. I am not one of those who requires everything is open source or open.

Proprietary software doesn't make me uncomfortable, but softwares with security holes do.

Okay, right, I forgot: Flash's performance sucks. That's the only thing I bitch about Flash.

I found this jquery-lifestream plugin on GitHub and its fairly easy to use, here is a quick example of my blog feed, GitHub, and Google Code updates:

It already has support for more 20 or 30 services (its a long list, didnt count), and you can write your template for layout which fits in with your design. The following code is the setup, you can see I add blog post author name for the output:

$("#lifestream").lifestream({
  limit: 15,
  list: [
    {
      service: "blogger",
      user: "yjlv",
      template: {
        posted: '${author.name} posted <a href="${origLink}">${title}</a>'
      }
    },
    {
      service: "github",
      user: "livibetter"
    },
    {
      service: "gcode",
      user: "http://code.google.com/feeds/u/115422682039760465813/updates/user/basic"
    }
  ]
});

You can even add more services without adding to the original code. For example, it does not support Google Code but you can see I have the updates from my Google Code account listed above. The updates on Google Code uses Atom feed, but jquery-lifestream doesnt support it. But thats fine, because you can easily expand jquery-lifestream:

(function($) {
  $.fn.lifestream.feeds.gcode = function( config, callback ) {

    parseFeed = function( input ) {
      var output = [], list, i = 0, j;
      if(input.query && input.query.count && input.query.count > 0) {
        list = input.query.results.entry;
        j = list.length;
        for( ; i<j; i++) {
          var item = list[i];

          output.push({
            url: config.user,
            date: new Date( item.updated ),
            config: config,
            html: item.title.content
          });
        }
      }
      return output;
    };

    $.ajax({
      url: $.fn.lifestream.createYqlUrl('select * from atom where url="'
        + config.user + '"'),
      dataType: 'jsonp',
      success: function( data ) {
        callback(parseFeed(data));
      }
    });

  };
})(jQuery);

You can rewrite the parser, do some advanced tasks, such as filter or extraction of some data from feed. For example, you can use jQuery to parse the html and extract the image, so it can be used as thumbnail. If you know about JavaScript, you can enrich the results easily.

I think this can be used in many cases and it doesnt have to be your contents. You can add some blogroll, photo collection of multiple Flickr account, or updates from all kinds of social networkings for a project. Or just a gadget for your blog, which gathers your photos, tweets, etc. It can keep your blog or webpage cleaner.

A few hours ago, Gmail announced a new video and chat plugin for Linux users. I am a 64-bit user, pure one, there is no 32-bit library on my system. I wasnt going to try because 1) I am not into online IM chatting not to mention this voice and video chatting and 2) I dont believe that Google would release a 64-bit stuff.

But you know curiosity killed the cat, so I went to download, just to file to find out if they are 64-bit build or just 32-bit as my expectation. I ran

ar -x google-talkplugin_current_amd64.deb
tar xf data.tar.gz
cd opt/google/talkplugin

Now, its about to see the truth:

% file * */*
GoogleTalkPlugin:         ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
cron:                     directory
lib:                      directory
libnpgoogletalk64.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
libnpgtpo3dautoplugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
cron/google-talkplugin:   POSIX shell script text executable
lib/libCg.so:             ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
lib/libCgGL.so:           ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped</pre>

(Side note: you can see there is a cron, Google installs a cron job to update .deb package, so this plugin would never get outdated. I really can not agree with this automatic method. (I assume that its automatic, I didnt read that script))

I was shocked, twice! First shock was there did have 64-bit shared library and the second shock was why the hell this GoogleTalkPlugin is a 32-bit build? I couldnt understand. As far as I know, the browser plugin uses shared library, so that 32-bit stuff shouldnt be a problem, it must be some kind of desktop manager for the plugin, its worth trying. (I was wrong. :()

So, I tried to install it:

chmod +x *.so lib/*.so
cp *.so ~/.mozilla/plugins/
sudo cp lib/* /usr/lib64/

I installed them in Mozillas (Firefoxs) plugin directory, so Chromium can also use it. After restarted browser, I got a good sign from Chromium and Firefox.

http://farm5.static.flickr.com/4078/4909533786_c24758bf5c_z.jpg
http://farm5.static.flickr.com/4075/4908936395_89c9ce9cef_z.jpg

So, I recompiled my kernel with required modules. Rebooted, got into Gmail in Chromium, went to setting. Nothing!? Switched to Firefox, still nothing.

Then, I ran Chromium from command-line, I got this log:

[000:017] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[000:022] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[000:022] Warning(optionsfile.cc:22): Load: Could not open file
[000:022] Warning(clientchannel.cc:553): Failed to get GoogleTalkPlugin path. Trying default.
[000:025] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin
[000:025] Waiting for GoogleTalkPlugin to start...
[001:098] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[001:099] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[001:099] Waiting for GoogleTalkPlugin to start...
[002:190] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[002:191] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[002:191] Waiting for GoogleTalkPlugin to start...

I could only say !#$%^, Google!

If your system is multilib, I think you have good chance to get it running, just move that 32-bit stuff to /opt/google/talkplugin/GoogleTalkPlugin.

Google, please re-build GoogleTalkPlugin for 64-bit! Pretty please?