CSS Responsive media queries

Below provided CSS responsive media queries for mobile, tabs, desktops

/*Mobile view*/

@media (min-width : 320px) and (max-width : 480px) {

// related CSS

}

/*Tab view*/

@media (min-width : 480px) and (max-width : 760px) {

// related CSS

}

/*Tab view*/

@media (min-width : 760px) and (max-width : 980px) {

// related CSS

}

/*Desktop view*/

@media (min-width : 980px) and (max-width : 1024px) {

// related CSS

}

Advertisements

Why ‘sudo’ command use in linux ?

In Ubuntu Linux there is not root account configured by default. If users want root account password then they can manually set it up can use ‘sudo’.

‘su’ Vs ‘sudo’

‘su‘ forces you to share your root password to other users whereas ‘sudo‘ makes it possible to execute system commands without root password. ‘sudo‘ lets you use your own password to execute system commands i.e., delegates system responsibility without root password.

Ubuntu basic commands

Below specified basic Ubuntu commands

Change owner

sudo chown user_name modules/ 
Using this command change owner for a particular folder.

sudo chown -R user_name modules/ 
Using this command change owner for a folder along with inner files recursively.

Change permissions 

sudo chmod 777 default/ 
Using this command change permissions for a particular folder or file.

sudo chmod -R 777 default/ 
Using this command change permissions for a folder along with inner files recursively.

Change directory

$ cd default

Goto previous directory

$ cd ..

Get current cirectory

$ pwd

“LESS could not create a directory in public” issue in Drupal

LESS could not create a directory in public://less/51761ea74e5068.61766466/sites/all/themes/theme_name/css

Warning: Invalid argument supplied for foreach() in drupal_pre_render_styles() (line 3311 of /home/seat3/public_html/site_folder/drupal/includes/common.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6300 of /home/seat3/public_html/site_folder/drupal/includes/common.inc).

To solve this issue need to give 777 permissions "/var/www/site_folder/htdocs/sites/default" at least need to gave 775.

Your drupal site files directory has to be writable by your webserver.

Below specified "Ubuntu command" for change permissions. 
/var/www/site_folder/htdocs/sites$ sudo chmod -R 777 default/

Successful Upload to S3 but error on /system/ajax

I’m trying to use S3 CORS for my project and I’m encountering the error below:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Pagh: /system/ajax
StatusTest: n/a
ResponseText:
Error
Error message
Warning: filesize(): stat failed for s3://file-name.txt in file_save() (line 605 of /srv/bindings/ 8583c5f5083a475a9d644d64d843b077/code/includes/file.inc).
PDOException: SQLSTATE[2300]: Integrity constraint violation: 1062 Duplicate entry ‘s3://file-name.txt’ for key ‘uri’: INSERT INTO {file_managed} (uid, filename, uri, filemie, filesize, status, timestamp, type) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array(
[:db_insert_placeholder_0] = > 1
[:db_insert_placeholder_1] = > file-name.txt
[:db_insert_placeholder_2] = > s3://file-name.txt
[:db_insert_placeholder_3] = > text/plain
[:db_insert_placeholder_4] = > 0
[:db_insert_placeholder_5] = > 0
[:db_insert_placeholder_6] = > 1398930781
[:db_insert_placeholder_7] = > default
)
in drupal_write_record() (line 7211 of /srv/bindings/8583c5f5083a475a9d644d64d843b077/code/includes/common.inc).

The website encountered an unexpected error. Please try again later.
–>

Close
Close
Close

Ready State: undefined

 

Below provided some of alternatives to check this error.

1. Insert the same filename into multiple times.
2. Cause of this issue can be having multiple CORS3 Upload fields on a single form.