Friday 6 December 2013

Change services bootup runlevel

chkconfig for Ubuntu (sysv-rc-conf)


There is an alternative for editing runlevels that can be used just like chkconfig (Red Hat):
http://sysv-rc-conf.sourceforge.net/

To install & run:

# sudo apt-get install sysv-rc-conf
# sudo sysv-rc-conf

Excerpt from the manual:
DESCRIPTION
sysv-rc-conf gives an easy to use interface for managing /etc/rc{runlevel}.d/ symlinks. The interface comes in two different flavors, one that simply allows turning services on or off and another that allows for more fine tuned management of the symlinks. It’s a replacement for programs like ntsysv(8) or rcconf(8).
sysv-rc-conf can also be used at the command line when the desired changes to the symlinks are already known. The syntax is borrowed from chkconfig(8).



source

Sunday 27 October 2013

6 pequeños trucos para Prestashop que te salvarán la vida

http://guiabreve.com/6-pequenos-trucos-para-prestashop-que-te-salvaran-la-vida.html

How to migrate/move Prestashop to another server


  • Copy all files from Prestashop Development (PsD) to Prestashop Production (PsP).
  • PsD: Export database using phpmyadmin in zip format.
  • PsP: Create new database username and password.
  • PsP: Import database using phpmyadmin.
  • PsP: Give the username created full privileges to imported database.
  • PsP: Change Prestashop configuration if needed: /prestashop/config/settings.inc.php
define('_DB_SERVER_', '________');
define('_DB_NAME_', '________');
define('_DB_USER_', '________');
define('_DB_PASSWD_', '________');
define('_DB_PREFIX_', '________');
...etc.
  • PsP: Force .htaccess regeneration by:
# mv /prestashop/.htaccess /prestashop/.htaccess-dev
  • PsP: Browse and login into the Prestashop administration page: 
http://<URL>/admin1111/
  • PsP: Go to Preferences  > SEO & URLs > Set shop URL and change Shop domain + SSL domain + Base URI accordingly to our new configuration
  • PsP: Go to Preferences  > SEO & URLs > Set up URLs > Friendly URL switch it's state to regenerate the .htaccess file.

*In case we experience domain relocation problems, configuration of Shop domain and SSL domain can be found in the database : SELECT * FROM `ps_configuration` WHERE `name` LIKE '%shop_domain%' 

Regards.

Wednesday 23 October 2013

Installing optimus graphic card on ubuntu/linux mint

With 2GB NVIDIA GeForce GT 525M Graphics Card with Optimus installing nvidia-current drivers from restricted drivers causes the loss of compositing. Moreover running nvidia-xconfig crashes X on the next reboot (fix it with sudo rm /etc/X11/xorg.conf and reboot). This happens because you need Bumblebee to make it work, more explanations follow the suggested procedure.
The Bumblebee stable PPA and more information about this subject can be found in Bumblebee.
As an example, using Bumblebee, it changes battery rate from 1900+ to around 1600 for me (verwilst). The current rate (with disconnected charger) can be tested using:
grep rate /proc/acpi/battery/BAT0/state
Installation on 12.04
Add bumblebee ppa, reload, check your update and install bumblebee. Finally add your $USER (replace by your username) to the group bumblebee :
$ sudo add-apt-repository ppa:bumblebee/stable

$ sudo apt-get update && sudo apt-get upgrade

$ sudo apt-get install bumblebee bumblebee-nvidia

$ sudo usermod -a -G bumblebee $USER
Now restart, and check your configuration :
$ glxspheres

$ optirun glxspheres

And compare the fps... If you need to use the nvidia video card, launch your application with optirun at the begin of the command line.

Thursday 10 October 2013

Installing aptana in ubuntu based systems

# sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 git-core
# sudo add-apt-repository ppa:webupd8team/java
# sudo apt-get update
# sudo apt-get install oracle-java7-installer
Download Aptana: http://www.aptana.com/products/studio3/download
# sudo unzip Aptana_Studio_3_Setup_Linux_x86_3.4.2.zip -d /opt
# wget http://www.samclarke.com/wp-content/uploads/2012/04/AptanaStudio3.desktop
# sudo mv AptanaStudio3.desktop /usr/share/applications/AptanaStudio3.desktop

enjoy!

---- more ---

AptanaStudio3.desktop

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Aptana Studio 3
GenericName=Integrated Development Environment
Comment=Aptana Strudio 3 Integrated Development Environment
Exec=/opt/Aptana_Studio_3/AptanaStudio3 %F
TryExec=/opt/Aptana_Studio_3/AptanaStudio3
Icon=/opt/Aptana_Studio_3/icon.xpm
StartupNotify=true
StartupWMClass="Aptana Studio 3"
Terminal=false
Type=Application
MimeType=text/xml;application/xhtml+xml;application/x-javascript;application/x-p
hp;application/x-java;text/x-javascript;text/html;text/plain
Categories=GNOME;Development;IDE;


source: http://www.samclarke.com/2012/04/how-to-install-aptana-studio-3-on-ubuntu-12-04-lts-precise-pangolin/

Monday 30 September 2013

WikiMindMap

WikiMindMap is a tool to browse easily and efficiently in Wiki content, inspired by the mindmap technique.
http://www.wikimindmap.org/

Saturday 28 September 2013

android: list of apps/software i regularly use

9gag
adobe reader
afterfocus
bicing
blogger
chess free
chrome
chrome to phone
clean master
drive
dropbox
google earth
eltenedor.es
fbreader
feedly
flickr
astro
google analytics
aws console
prestashop mobile
gmail
gnucash
google+
grooveshark
hangouts
instagram
keepassdroid
linterna
google maps
meetup
movie studio
my tracks
pixlr-o-matic
power note
quickoffice
retouch free
skype
smart voice recorder
tasks free
tmb virtual
google translator
twitter
ubuntu one
viber
whatsapp
winamp
wlanaudit
wordpress
wunderlist
youtube

ubuntu: list of software i regularly use

thunderbird
chrome
firefox
vlc
keepassx
skype
skype call recorder
sublime text
filezilla
transmission
dragondisk
focuswriter
kapow punch clock
shutter
radio tray
alarm clock
dropbox
syncdrive
system load indicator
ubuntu one
classicmenu indicator
aptana
gimp
inkscape
libreoffice
pencil
gtimelog
tomate
pdf mod
xournal
wifi radar
wireshark
calibre
freemind
planner
gnucash
fbreader
smartgit
rabbitvcs
poedit
playonlinux
wine
brasero
recordmydesktop
openshot
handbrake
format junkie
gespeaker
gnomad 2
meld
ubuntu tweak
flickr uploader

Tuesday 24 September 2013

mobile devices icon sizes


Icon size:
  • iOS: 57x57, 72x72, 114x114 and 144x144.
  • Android: 48x48, 72x72, 96x96, 144x144.
then resize through code.



more...
http://developer.android.com/design/style/iconography.html
http://www.creativefreedom.co.uk/icon-designers-blog/android-app-icon-size-guide-4-0/
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/LayoutandAppearance.html#//apple_ref/doc/uid/TP40006556-CH54-SW1

android: quick remote debugging on android with google chrome

1. Android

  • (only first time) Enable Developer Options in your Android phone: Settings > About phone > tap 7 times.
  • Enable USB debugging: Settings > Applications > Development Options > USB debugging.
  • Open Chrome.
  • Enable USB Web debugging: Settings > Advanced > Developer Tools > USB Web debugging.
  • Connect Android to the computer via USB.

2. Computer

  • Open Chrome.
  • Install ADB extension.
  • Start ADB extension: ADB Plugin > Start ADB
  • Inspect target: ADB Plugin > View Inspection Targets
Source

Monday 23 September 2013

Top 15 Must Have WordPress Plugins of 2013

"Top 15 Must Have WordPress Plugins of 2013: infographic" http://www.wordpressintegration.com/blog/top-15-must-have-wordpress-plugins-of-2013-infographic/

prestashop: setup php job in cron service

cron service time format:
* * * * * <instruction>
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)

cron generators: here and here.

instruction format:
wget -q --spider http://example.com/modules/mymodule/cron.php
(or full path: /usr/bin/wget)
php -f /var/www/module/mymodule/cron.php
(or full path: /usr/bin/php)

Examples:
*/5 * * * * wget -q --spider http://example.com/modules/mymodule/cron.php
*/5 * * * * /usr/bin/php -f /var/www/module/mymodule/cron.php

Thursday 12 September 2013

10 Formas de Reducir las Devoluciones de tu Tienda Online

"10 Formas de Reducir las Devoluciones de tu Tienda Online - PrestaShop Blog Español" http://www.prestashop.com/blog/es/10-formas-de-reducir-las-devoluciones-de-tu-tienda-online/

prestashop: delete "our stores" from footer links

  • Locate <!-- MODULE Block footer --> in html code
  • Then target your changes to file: 
/prestashop/modules/blockcms/
or
/prestashop/themes/theme-name/modules/blockcms/
  • Delete or comment unnecessary lines:
{if $display_stores_footer}<!-- <li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{ls='Our stores' mod='blockcms'}</a></li> -->{/if}


prestashop: add javascript and/or css file to a theme


  1. Add js and/or css files in /prestashop/themes/theme-name/js (or css).
  2. Edit /prestashop/classes/controller/FrontController.php.
  3. Add:

<?php
class FrontController extends FrontControllerCore
{
    public function setMedia()
    {
        parent::setMedia(); // CSS files
        Tools::addJS(_THEME_JS_DIR_.'myfile.js');
        Tools::addCSS(_THEME_CSS_DIR_.'myfile.css', 'all');
    }
}

Wednesday 11 September 2013

prestashop: manage newsletter list

create a mysql user with restricted access only to...
database: prestashop + table: prefix_newsletter

prestashop: add javascript file at the end of the html

open the prestashop/themes/theme-name/footer.tpl and add:
    <!-- added -->
    <script type="text/javascript" src="/js/myfile.js"></script>
    <!-- added  -->
</body>
</html>

create new javascript file in prestashop/js/myfile.js