URL redirect rewrite using the .htaccess file

Create a 301 redirect for all http requests that are going to the old domain to new domain

If you are wanting to only redirect a specific subdomain, you would do something like this:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^olddomainname.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.olddomainname.com$
  RewriteRule (.*)$ http://www.newdomainname.com/$1 [R=301,L]

Redirect  301 /olddomainname http://www.newdomainname.com

Integrate Instagram Without API + Drupal 8


It is a very simple module that interacts with Instagram without an API and creates a block containing your latest messages from Instagram.

To send bug reports and design feedback or to track changes: https:/www.drupal.org/project/issues/instagram without api Go to Block Design to attach Instagram Block to specific content region.
I.e Home-> Admin-> Structure-> Block.

You must also add the Instagram account user name as part of the block setup to pull posts.

MODULE URL: https://www.drupal.org/project/instagram_without_api


Drupal Theme Hook Suggestions

Theme hook enables any module or theme to provide suggestions for alternative theme feature or template name suggestions and reorder or remove suggestions.

Drupal 7:

* Implements hook_preprocess_HOOK() for node templates.
function MYTHEME_preprocess_node(&$variables) {
  $variables['theme_hook_suggestions'][] = 'node__' . 'first';
  $variables['theme_hook_suggestions'][] = 'node__' . 'second';

Drupal 8:

* Implements hook_theme_suggestions_HOOK_alter() for node templates.
function MYTHEME_theme_suggestions_node_alter(array &$suggestions, array $variables) {
  $suggestions[] = 'node__' . 'first';
  $suggestions[] = 'node__' . 'second';


What are the timer functions to measure the kernel function time

Kernal Function Timefunction "do_gettimefoday" is used to get the time value in kernel.

struct timeval time;

unsigned long local_time;

do_gettimeofday(&time); local_time = (u32)(time.tv_sec - (sys_tz.tz_minuteswest * 60)); rtc_time_to_tm(local_time, &tm);

printk(" @ (%04d-%02d-%02d %02d:%02d:%02d)\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);

Simplelogin - Customize Drupal Login, Password and Register pages with Background images

Simplelogin - Customize Drupal Login, Password and Register pages with Background images

It is a basic module with Background images for customizing Drupal Login, Password, and Register pages.

Administrators can provide consumers with the ability to add user username, password, registration pages with their own background images / background colour. Different features include background color customization, image settings.

URL: https://www.drupal.org/project/simplelogin


Difference between kernel load address and entry point

Load Address is RAM location where the kernel binary image is to be copied. Entry Point is the Location of the copied binary to be executed by uboot to boot kernel.

Your RAM is mapped at 80000000 and kernel LOAD ADDRESS is 80008000. bootm command uncompress the uImage from copied image location to 80008000 address and then calls the kernel entry point (may be the same address : 80008000) to execute the kernel.

Why all the pins on a chip are not GPIOs?

All the pins in SOC are not GPIO. A specific group of pins mapped as GPIO. Other pins are configured for specific protocols like DDR, SPI, I2C... etc. GPIO is generic pins can be used for any purpose based on user requirement. It can be used for handling IRQs, trigger Resets, Glow LEDs..etc.

for example, Consider a FPGA is connected to SOC via GPIOs. User need to program the FPGA via these GPIO pins. In SOC side user need to write a specific program with mentioned sequence to drive those GPIO to program the FPGA config file

Installation PHP SOAP on CentOS7 in PHP7

Install "php-soap":
sudo yum install php70w-soap

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.digistar.vn
* epel: epel.mirror.srv.co.ge
* extras: centos-hn.viettelidc.com.vn
* nux-dextop: mirror.li.nux.ro
* updates: mirror.digistar.vn
* webtatic: sp.repo.webtatic.com

Add CSS files and JavaScript files at the bottom of a page in Drupal 7

template_preprocess_html() in template.php file. Preprocess variables for html.tpl.php

function themename_preprocess_html(&$variables) {

  // Add external file
  drupal_add_css('https://fonts.googleapis.com/css?family=Roboto:400,300,500,700',array('type' => 'external'));

  // Add Javascript file at the bottom of a page
  drupal_add_js('/sites/all/themes/purple/js/bootstrap.min.js', array('type' => 'file', 'scope' => 'footer', 'weight' => 10));