[SOLVED] Convert ogv to gif

First install this:

sudo apt-get install imagemagick mplayer gtk-recordmydesktop

On a terminal:

mplayer -ao null <video file name> -vo jpeg:outdir=output

Use ImageMagick to convert the screenshots into an animated gifs.

convert output/* output.gif

you can optimize the screenshots this way:

convert output.gif -fuzz 10% -layers Optimize optimised.gif

 

Source: http://askubuntu.com/a/107735/65087

[SOLVED] Recursive image optimisation for web

use jpegoptim for jpeg files and optipng for pngs.

 

save this code to the file e.g., optimize.sh 

#!/bin/bash
optimize() {
  jpegoptim *.jpg --strip-all
  for i in *
  do
    if test -d $i
    then
      cd $i
      echo $i
      optimize
      cd ..
    fi
  done
  echo
}
optimize

change permissions:

chmod +x optimize.sh

 

and run it in desired folder:

./optimize.sh

 

Source: http://jmperezperez.com/jpegoptim-optimize-jpg-page-speed/

[SOLVED] Fixed PHP Warning: Module ‘apc’ already loaded in Unknown on line 0

You are getting this message “[SOLVED] Fixed PHP Warning:  Module ‘apc’ already loaded in Unknown on line 0″

every time you execute the php in your console.

It means that you have already activated the apc.so extension.

You must check the second module activation.

Here you can find the apc.ini config file

$ locate apc.ini 
/etc/php5/conf.d/20-apc.ini
/etc/php5/mods-available/apc.ini

Now locate php.ini files and check them for uncommented “extension=apc.so” line

$ locate php.ini
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini

check files for uncommented “extension=apc.so”

$ cat /etc/php5/apache2/php.ini | grep apc.so
;extension=apc.so

Here you found it

$ cat /etc/php5/cli/php.ini | grep apc.so
extension=apc.so

 

Edit the file

 sudo vim /etc/php5/cli/php.ini

and add “;” before “extension=apc.so

save it and you are done

 

Source: http://blog.ciuly.com/my-server/php-warning-module-apc-already-loaded-in-unknown-on-line-0/

 

 

 

[SOLVED]Preselect refinement label in Google Custom Search Engine

var searchOps = {'defaultToRefinement': '[YOUR_REFINEMENT_LABEL]'};
var searcher = new google.search.CustomSearchControl('[Custom Search ID]', searchOps);

Source: http://productforums.google.com/d/msg/customsearch/X2NBjMqyxPM/vsTXmxowJNQJ

Documentation: https://developers.google.com/custom-search/docs/js/cselement-reference?hl=en

[SOLVED] Ubuntu: Configure Google Public DNS IPs

open resolv.conf

$ sudo vi /etc/resolv.conf

just add

nameserver 8.8.8.8
nameserver 8.8.4.4

Why should you try Google Public DNS?

By using Google Public DNS you can:

Source: https://developers.google.com/speed/public-dns/

[SOLVED] Add recursive .svn ignore to .gitignore

just put

*.svn*

to your .gitignore file

[Solved] Linux: make screenshot of the virtual screen

Make screenshot on display 1 with the imagemagick

DISPLAY=:1 import -window root screen.png

Source: Xvfb and Firefox headless screenshot generator « Ivan Villareal.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: