Tuesday, November 22, 2016

Setup Custom TinyWebDB (App Inventor) in Ubuntu or Linux




1. For this tutorial, you will use two commands from the Google App Engine SDK:
1.1. dev_appserver.py, to run the development web server locally
1.2. appcfg.py, for uploading your app to App Engine -- e.g:  In your terminal run the following command: ~/path-to-your-google-cloud-sdk/platform/google_appengine/appcfg.py update ~/customtinywebdb/appinventordb

2. Custom TinyWebDB Tutorial in App Inventor Website: http://bit.ly/2gCYjKw

3. Download Custom TinyWebDb: http://bit.ly/2fiHT3R

4. Installing Google Cloud SDK for App Engine using Python 2.7 in Ubuntu 14.04: http://bit.ly/2gbpWZE

Monday, November 21, 2016

Installing Google Cloud SDK for App Engine using Python 2.7 in Ubuntu 14.04

This tutorial shows you the various steps to successfully install the Google Cloud SDK for App Engine using Python 2.7 in Ubuntu 14.04.

1. First make sure whether you have Python 2.7 installed or not. Open your terminals and enter the following command:

 $ python -V  

You should similar output as this: Python 2.7.6.

2. Download the SDK for App Engine from here: http://bit.ly/2fe0azC. Make sure you select the Python version.

3. Once your file downloads, extract it in any folder of your choice. In our example we will extract it inside the Home directory. Your SDK path in side the home folder should be like:

 ~/google-cloud-sdk/bin  

Note: In Ubuntu ~ represent the Home directory.

4. Remain in your home folder (do not change directory to your SDK folder) and execute the following commands in your terminal.

 ./google-cloud-sdk/install.sh  

You should be getting the following result as shown in the image below:

Click image to enlarge

5. You will be asked the following questions which you may respond as below:


5.1 To help improve the quality of this product, we collect anonymized usage data  and anonymized stacktraces when crashes are encountered.. You may choose to opt out of this collection now (by choosing 'N' at the below prompt), or at any  time in the future by running the following command:

gcloud config set disable_usage_reporting true

Do you want to help improve the Google Cloud SDK (Y/n)?  N

5.2. Modify profile to update your $PATH and enable shell command
completion? (Y/n)
?  Y

5.3. Enter a path to an rc file to update, or leave blank to use
[/home/evagabond/.bashrc]
: just leave blank and hit enter


Iniitialize SDK


Use the gcloud init command to perform several common SDK setup tasks. These include authorizing the SDK tools to access Google Cloud Platform using your user account credentials and setting up the default SDK configuration.

Once you run the initi command, your default browser will open up and you will be asked to sign into your google account. This will be the account connected to your App Engine and various Google Cloud related services. 

6.1. Open up another terminal and run the following command:

 gcloud init  

6.2 Accept the option to log in using your Google user account:

 To continue, you must log in. Would you like to log in (Y/n)? Y  

For further instructions on initialization you may go through the following Google Documentaiton: http://bit.ly/2gsZdrY

Installing App Engine:

 Once you have successfully performed the installations explained above, you can now install the App Engine by running the following command in your terminal (also refer image below). Make sure you are outside your SDK folder else the command wont execute.

 gcloud components install app-engine-go  



To run App Engin: 

 dev_appserver.py app.yaml  

Helpful Resources by Google:

Sunday, November 13, 2016

Change 'Default Welcome Message' in Magento 2.1.x & Cleaning Cache



This tutorial shows the steps to change the 'Default Welcome Message' as of Magento 2.1.x and also shows how to clear the Magento cache.


Thursday, November 10, 2016

Magento 2 CLI/Terminal Commands

Commands for Magento 2x

If you are a Terminal/CLI ninja and have been seeking for nifty CLI commands, head forward!

Note: You may/may not have to enter 'sudo', depending on your folder permission settings. In my case I had to so I have added 'sudo' before each of my command.

>> To view Magento Help Commands:
php bin/magento

>> To REINDEX CACHE: php bin/magento indexer:reindex

>> To Clean Cache:
php bin/magento cache:clean

- Cache Options: config , layout , block_html , collections , reflection , db_ddl , eav , customer_notification , full_page , config_integration , config_integration_api , translate , config_webservice

- Cache Options Usage:
  • php bin/magento cache:clean config layout translate
  • php bin/magento cache:flush – flush cache storage
  • php bin/magento cache:enable
  • php bin/magento cache:disable
  • php bin/magneto cache:status – check cache status

>> Maintenance Mode:

  • Sets maintenance mode exempt IPs: php bin/magento maintenance:allow-ips your_ip_address1 ip_address2
  • Disable Allowed IPs: php bin/magento maintenance:enable --ip=none
  • Disables maintenance mode: php bin/magento maintenance:disable 
  • Enable maintenance mode: php bin/magento maintenance:enable 
  • Displays maintenance mode status: php bin/magento maintenance:status
For more on Maintenance Mode, you may check Magento Guide at: http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-maint.html

    >> Info:
    • Displays the Magento Admin URI: php bin/magento info:adminuri 
    • Displays the list of available currencies: php bin/magento info:currency:list 
    • Displays the list of available language locales: php bin/magento info:language:list 
    • Displays the list of available timezones: php bin/magento info:timezone:list

    >> Admin Solutions: 

      >> Module:
      • Disables specified modules: php bin/magento module:disable module_name --clear-static-content
      • Enables specified modules: php bin/magento module:enable module_name --clear-static-content
      • Displays status of modules: php bin/magento module:status 
      • Uninstalls modules installed by composer: sudo php bin/magento module:uninstall

      >> Setup:
      • Takes BACKUP of Magento Application code base, media and database: php bin/magento setup:backup
      • Run CRON for Setup Application: php bin/magento setup:cron:run
      • Installs and upgrades data in the DB: php bin/magento setup:db-data:upgrade
      • Installs and upgrades the DB schema: php bin/magento setup:db-schema:upgrade
      • Checks if DB schema or data requires upgrade: php bin/magento setup:db:status
      • Generates DI configuration and all missing classes that can be auto-generated: php bin/magento setup:di:compile
      • Installs the Magento application: php bin/magento setup:install
      • Rolls back Magento Application codebase, media and database: php bin/magento setup:rollback
      • Deploys static view files: php bin/magento  setup:static-content:deploy
      • Installs the store configuration: php bin/magento setup:store-config:set
      • Uninstalls the Magento application: php bin/magento setup:uninstall
      • Upgrades the Magento application, DB data, and schema: php bin/magento setup:upgrade

      >> Theme:
      Uninstall Theme: php bin/magento theme:uninstall theme_name

      Probably the above method is only applicable to themes that have been installed using composer. For other themes that haven't been installed using composer, please refer to the methods below:
      An important point I noticed from Reference 2 was this SQL query:

      There is a table in database named as theme.You can use the below code to delete your theme:

       USE dbname;  
       DELETE FROM theme where theme_id=5;  
      


      >> Sample Data:
      • Deploy sample data modules: php bin/magento sampledata:deploy
      • Remove all sample data packages from composer.json: php bin/magento sampledata:remove
      • Reset all sample data modules for re-installation: php bin/magento sampledata:reset

      >> Magento Mode:
      • Display current mode: php bin/magento deploy:mode:show
      • Change mode: magento deploy:mode:set {mode} [-s|--skip-compilation]
        where
        {mode}
        is required; it can be either developer or production
        --skip-compilation is an optional parameter you can use to skip code compilation when you change to production mode.
      • Change to production mode: magento deploy:mode:set production
      • Change to developer mode: If you’re changing from production mode to developer mode, delete the contents of the var/generation and var/di directories:

         rm -rf <your Magento install dir>/var/di/* <your Magento install dir>/var/generation/*   
        
         php bin/magento deploy:mode:set developer 
          or
         php bin/magento module:enable [--force] Magento_Developer  
        

        Saturday, November 5, 2016

        [SOLVED] - Problem after Updating NVIDIA Drivers in Dell 5558 Laptop using Ubuntu 14.04

        Today I was recommended to update my NVIDIA drivers to its latest version nvidia-graphics-drivers-367 package. Once I updated and rebooted my Dell 5558 laptop, using Ubuntu 14.04 I experienced a blank login screen. After some Google searching I found out that probably the Unity Service had failed to load because of driver incompatibility issue.

        So the solution I figured out was to switch to terminal from the blank login screen; where I was unable to see nothing. Press CTRL+ALT+F2 to switch to Terminal. Then log into your account and hit the following command to remove the NVIDIA drivers completely from your system:

         sudo apt-get remove --purge nvidia-*  
        

        You should be getting a message as displayed in the image below:


        Confirm by pressing 'y or Y' to delete.

        Once deleted restart your computer and install the compatible driver version.

        In my case I had TimeShift installed which is a software that allows feature just like Windows Restore through which I restored my computer to the state just before it was updated.

        Top Magento Hosting:

        Top 5 Posts (Weekly)

        Lets Connect: