August 10, 2014

[SOLVED] Fixed: Lossy operations are not currently supported

kinda fixed

if you getting

Warning: Running "imagemin:dist" (imagemin) task
Warning: Command failed: ** Error: Lossy operations are not currently supported
Use --force to continue.


just uninstall optipng

  sudo apt-get remove optipng
 

Source: http://subdigit.com/blog/project-bootstrapping/

July 23, 2014

[SOLVED] Remove Untagged Images From Docker


Remove all stopped containers.
docker rm $(docker ps -a -q)

Remove all untagged images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")

July 12, 2014

[SOLVED]Google Cloud Print and the Raspberry Pi

# sudo apt-get update
# sudo apt-get install build-essential python-dev libcups2-dev

# install cups on raspberry http://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/

# sudo apt-get install python-setuptools
# sudo easy_install pip

# sudo pip install cloudprint pycups

# cloudprint

# sudo cp .cloudprintauth .cloudprintauth.sasl /root

# sudo nano /etc/init.d/gcloudprint

Paste
#! /bin/bash
# /etc/init.d/gcloudprint

### BEGIN INIT INFO
# Provides:        cloudprint
# Required-Start:    $remote_fs $syslog
# Required-Stop:    $remote_fs $syslog
# Default-Start:    2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:    System service to run cloud print connector
# Description:        System service to run cloud print connector
### END INIT INFO

# Carry out start/stop/restart actions
case "$1" in
    start)
        echo "Starting cloud print connector"
        sudo -u pi cloudprint >> /var/log/cloudprint.log &
        ;;
    stop)
        echo "Stopping cloud print connector"
        killall cloudprint
        ;;
    restart)
        echo "Restart connector"
        echo "Stopping cloud print connector"
        killall cloudprint
        echo "Starting cloud print connector"
        sudo -u pi cloudprint >> /var/log/cloudprint.log &
        ;;
    *)
        echo "Usage: /etc/init.d/gcloudprint {start|stop|restart}"
        exit 1
        ;;
esac

exit 0


# sudo chmod +x /etc/init.d/gcloudprint
# sudo update-rc.d gcloudprint default




Sourcehttp://blog.onslow-web.co.uk/?p=71

May 9, 2014

[SOLVED] Reset unity on Ubuntu

I misconfiguret my unity on ubuntu. Can't move windows. No Title on windows.
This here helped 
  • dconf reset -f /org/compiz/
  • setsid unity
your windows will flicker a bit

restart your ubuntu


Source: https://www.youtube.com/watch?v=QoCmnLCY558

April 30, 2014

[SOLVED] Install multiple versions of Firefox on Ubuntu



  • Download desired firefox version here https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/
  • Extract it to e.g. /opt/firefox2/



Source: http://www.wikihow.com/Install-multiple-versions-of-Firefox-on-Ubuntu

April 3, 2014

[SOLVED] Install jenkins on debian


wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
Then add the following entry in your /etc/apt/sources.list:
deb http://pkg.jenkins-ci.org/debian binary/
Update your local package index, then finally install Jenkins:
sudo apt-get update
sudo apt-get install jenkins
Source: http://pkg.jenkins-ci.org/debian/

November 24, 2013

[SOLVED]HMA VPN via OpenVPN on Ubuntu with Network Manager


  • Install network-manager-openvpn-gnome
  • Download the vpn-config.zip ( http://hidemyass.com/vpn-config/vpn-config.zip )
  • Download the linux installer ( https://vpn.hidemyass.com/linux.zip )
  • Create vpn folder (e.g. ~/vpn)
  • Extract both zip files there
  • Open network-manager (System->Preferences->Network Connections)
  • Go to VPN tab
  • Import the *.ovpn entry for the location you wish to connect
  • Edit the entry and change the "Type" to Password with Certificates (TLS)
  • The gateway and cert/keys should already be populated from the import
  • Add your vpn username and password
  • Apply
  • Use the network icon in the panel to navigate to your VPN entry and connect






Source: http://wiki.hidemyass.com/Tutorials:HMA_VPN_via_OpenVPN_on_Ubuntu_with_Network_Manager

November 10, 2013

[SOLVED]Enable Hibernation in Ubuntu 13.10

sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Copy and paste below lines into the file and save it.

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

Source: http://ubuntuhandbook.org/index.php/2013/10/enable-hibernation-ubuntu-13-10/

October 20, 2013

[SOLVED]grub rescue

After unfortunate partition deletion/recovery I landed in "grub rescue" prompt

This helped me to get into ubuntu and repair the

#list your partitions
ls


#try to list contents of your linux partition and finding grub folder
ls (hd0,msdos3)/boot/grub


#use this partition
set prefix=(hd0,msdos3)/boot/grub


#set mod
insmod normal


#boot
normal

[SOLVED]resume: libgcrypt version: 1.5.*

After some partition problems I got the message on boot
resume: libgcrypt version: 1.5.*

....waited for 5 minutes to get into my ubuntu
sudo apt-get remove hibernate

it doesn't solved the issue

I booted one more time and made
sudo apt-get autoremove

package "uswsusp" was removed

after that I got no more resume libgcrypt messages

[SOLVED]resume: libgcrypt version: 1.5.*

After some partition problems I got the message on boot
resume: libgcrypt version: 1.5.*
....waited for 5 minutes to get into my ubuntu
sudo apt-get remove hibernate
it doesn't solved the issue I booted one more time and made
sudo apt-get autoremove
package "uswsusp" was removed after that I got no more resume libgcrypt messages

[SOLVED]grub rescue

After unfortunate partition deletion/recovery I landed in "grub rescue" prompt This helped me to get into ubuntu and repair the #list your partitions
ls
#try to list contents of your linux partition and finding grub folder
ls (hd0,msdos3)/boot/grub
#use this partition
set prefix=(hd0,msdos3)/boot/grub
#set mod
insmod normal
#boot
normal

August 27, 2013

[SOLVED] Install NodeJS on Debian

For Debian Wheezy, your best bet is to compile node by yourself:
sudo apt-get install python g++ make checkinstall
mkdir ~/src && cd $_
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
./configure
checkinstall #(remove the "v" in front of the version number in the dialog)
sudo dpkg -i node_*

Uninstall:
sudo dpkg -r node

In case you get a permission denied on the node executable, an alternative path might be:
umask 0022
./configure
make
checkinstall -D --umask 0022 --reset-uids --install=no
dpkg -i node_*.deb

 

Source: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-lmde

July 23, 2013

[SOLVED]How do I make Ubuntu appear as a bluetooth keyboard?

a compact version (essentially the same procedure – this worked better for me):



  1. Install libbluetooth-dev Install libbluetooth-dev.

  2. Download hidclient source code for Ubuntu. (Check the official page to make sure that's not out of date.) Put it in a folder by itself and extract its contents.

  3. Type make and press Enter to compile the source.

  4. Back up and edit your Bluetooth configuration:
    • sudo cp /etc/bluetooth/main.conf /etc/bluetooth/main.conf.old
    • gksu gedit /etc/bluetooth/main.conf
    • Under #DisablePlugins = network,input add the line DisablePlugins = input (no #).
    • Add a # to the beginning of Class = 0x000100; under it, write Class=0x000540 (no #).
    • Save the file and quit the text editor.

  5. If you want to be able to run hidclient like a normal command:
    • Run sudo cp hidclient /usr/local/bin.
    • Check if /usr/local/bin is in your path with echo $PATH.
    • If it's not, add it with any of these methods.
    If you skip this step, you can run hidclient by making sure you're in the directory where you compiled it, and running ./hidclient instead of hidclient.


Running hidclient


Run hidclient --help (or see the bottom of the web page) to see how to use it.

Except when run with the --help flag, hidclient must be run as root. So use sudo hidclient(followed by whatever options you're specifying, as explained in the help).

Basically, there's two steps:

  1. Run sudo hidclient -l for a numbered list of devices.

  2. Run sudo hidclient -eN -x, replacing N with the number of the device you want to "forward" over Bluetooth. In your case, this will be the keyboard.


You're all set. Tell your mobile device (iPad) to use a Bluetooth keyboard.

Terminating hidclient


The last thing you need to be able to do is to stop using the keyboard for Bluetooth input. See, whenhidclient is running, the device you select is no longer giving input to your Ubuntu system. If it were anything but the keyboard (say, the mouse), you could quit hidclient by pressing Ctrl+C in the Terminal.

But you cannot do that, because keyboard input won't go to the Terminal or any other Ubuntu program. The keyboard is acting as a Bluetooth device!

So, when "forwarding" the keyboard, quit hidclient by closing the Terminal window (or tab) in which it's running, with the mouse (or trackpad).

  • Of course, if your Ubuntu machine has multiple keyboards, you could "forward" one as a Bluetooth device and continue to use the other on your computer.


References/Acknowledgements



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

 

April 14, 2013

[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

April 10, 2013

[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 --all-progressive --max=90
  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


or

find . -name "*.jpg" -exec jpegoptim --strip-all --all-progressive --max=90 {} \;


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