December 7, 2012

[SOLVED] Running headless on Linux

First, install a VNC server:
sudo apt-get install vnc4server

Next, start and configure the server:
vncserver

At this point, it should ask you to create a password for VNC. Do so, then continue.

Start a VNC screen on screen 99:
vncserver :99

If that goes through alright, then kill the screens created. (For me, when I ran vncserver for the first time, it created a screen at :1, so we'll kill both of the screens created)
vncserver -kill :99
vncserver -kill :1

Done. Now, it "just works."

Source: http://forums.adobe.com/thread/740482

December 3, 2012

[SOLVED] Linux: resize all images via console

Just install ImageMagick if you dont have it yet

sudo apt-get install imagemagick

Resize all JPG files in to desired size

mogrify -resize 640x480 *.jpg

Source: http://www.baptiste-wicht.com/2010/09/tip-batch-resize-images-on-ubuntu-linux/

October 12, 2012

[SOLVED] Android. Get Signing certificate fingerprint (SHA1)

While creating the Client ID in the Google APIs Console you will be asked for
"Signing certificate fingerprint (SHA1):"

to obtain this fingerprint just run:
keytool -list -alias temp -keystore /path/to/your/keystore_file
you will be asked fot password and the Certificate fingerprint (SHA1) will be shown


"keytool comes with the Java SDK. You should find it in the directory that contains javac, etc."
via http://stackoverflow.com/a/2998451/47399 


October 11, 2012

[SOLVED] Install mod_pagespeed on ubuntu x64

Just run this in your console

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
sudo dpkg -i mod-pagespeed-*.deb
sudo apt-get -f install
sudo service apache2 restart

done. Now your page is faster. Check your page for chages - you will find many "pagespeed.ce.fm5FGAHKsn.css" like optimisations

 

More info on installation: https://developers.google.com/speed/docs/mod_pagespeed/download

September 17, 2012

[SOLVED]GAE:Make dev_appserver accessible from outside

Just start the appserver with the adress flag
$dev_appserver.py --address=0.0.0.0 ./src/

by default the appserver will be started with the localhost IP 127.0.0.1 and not accessible from outside

Source: https://developers.google.com/appengine/docs/python/tools/devserver

September 5, 2012

[SOLVED]Pull new updates for forked Github repository

Just run this in your forked git location:
$ cd github-services
$ git remote add upstream git://github.com/<user>/<repository>.git
$ git fetch upstream

Sourcehttp://stackoverflow.com/questions/3903817/pull-new-updates-for-forked-github-repository

[SOLVED] Hibernating your ubuntu via console

Just run this in console:
sudo /usr/sbin/pm-hibernate


For locking your session and hibernating just run:
gnome-screensaver-command -l && sudo /usr/sbin/pm-hibernate

August 31, 2012

[SOLVED] Increase YouTube upload limit from 15 minutes, to 12 hours

If you are getting "Upload HD videos in various formats up to 15 minutes." in youtube.

Just got to http://www.youtube.com/my_videos_upload_verify and verify your account.

 

August 23, 2012

[SOLVED] Fix permissons in linux

Just do:

to fix files permissions
find . -type f -exec chmod 644 {} \;

to fix folders permissions
find . -type d -exec chmod 755 {} \;

August 5, 2012

[SOLVED]No WebGL in Google Chrome v21 on Ubuntu 12.0

If your Google Chrome keeps saying you that your graphic card is not supported however you see WebGL stuff in your Firefox.

Just write
chrome://flags

in the adress bar of your chrome

And enable the "Override software rendering list Mac, Windows, Linux, Chrome OS".

Don't forget to restart the browser

August 3, 2012

[SOLVED]Connect Nexus 7 and/or Galaxy Nexus to ubuntu

You want to develop on your new shiny Nexus 7 and
adb devices

keeps giving you
???????? device

oprn your rules file
gksu gedit /etc/udev/rules.d/51-android.rules

probably you will see following line (if you already configured your Galaxy nexus) If not add it to the file, just in case
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666", OWNER="YOUR_USER_ID"

Now we should get the idVendor and idProduct from the Nexus 7. Connect it to your computer and
lsusb

you will see something like
Bus 001 Device 013: ID 18d1:4e42 Google Inc.

we need this two values

paste this string with proper values to 51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0666", OWNER="YOUR_USER_ID"

Save the file. Do the
sudo service udev restart

Now run
adb devices

you should see your device
List of devices attached
015d172c98280c0b device

Happy developing

Source: http://govfate.iteye.com/blog/1608379

June 8, 2012

[SOLVED] Android: Samsung Galaxy Tab 10.1 on Ubuntu

Just follow this tutorial http://forum.xda-developers.com/showthread.php?t=1077377

My 64bit RULES FILE:
ACTION!="add", GOTO="gtab_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"

ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685e", MODE="0777" SYMLINK+="gtab"

LABEL="gtab_usb_end"

LABEL="gtab_rules_end"

February 29, 2012

[SOLVED] Install PIL on Win x64

Goto http://www.lfd.uci.edu/~gohlke/pythonlibs/ and install e.g. PIL-1.1.7.win-amd64-py2.7.‌exe (=2.7 version of your python)

After you Install the PIL you can check if everything went right (you will need some image to do it)

Open console

C:\Python27>python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> im = Image.open('test.png')
>>> im.show()
>>>

If you have no errors everything went right

February 17, 2012

[SOLVED] Chrome silent print (without print confirmation)

You can do if you start your chrome (v18+) with the --kiosk --kiosk-printing switches.

You can see it from this video 



January 25, 2012

[SOLVED] Perl: How to replace umlauts with regex

You have a string with umauts you want to replace

$strNewXml = "ÜBERSICHTSKARTE MIT HIGHLIGHTS";

To replace "Ü" use \xdc where "dc" is a Hex value of the "Ü" character from this table

http://www.pjb.com.au/comp/diacritics.html

$strNewXml =~ s/\xdcBERSICHTSKARTE MIT HIGHLIGHTS//g;

 

 

January 15, 2012

[SOLVED] Ubuntu: Fixing messed up screen resolution

If you messed up with your display resolution try this:
To configure the monitor and display adapter, you need to re-configure 
your Xorg server. To do that, first backup your xorg.conf file by
executing the following command:

# sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

then, stop X by executing the following command (this will put you to
text only mode):

# sudo /etc/init.d/gdm stop

You can do the whole X configuration process by executing:

# sudo dpkg-reconfigure xserver-xorg

Once you have re-configured Xorg, start GNOME again by executing this
command:

# sudo /etc/init.d/gdm start


Source: lists.ubuntu.com