This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check CPU temperature in Ubuntu Using lm-sensors | |
sudo apt install lm-sensors | |
sudo sensors-detect | |
sensors | |
One can use the watch command command to run sensors command repeatedly, displaying its output on screen: | |
watch sensors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to compress a whole directory in Linux or Unix | |
You need to use the tar command as follows (syntax of tar command): | |
tar -zcvf archive-name.tar.gz directory-name | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush user-create adminuser --mail="[email protected]" --password="UserPw"; drush user-add-role "administrator" adminuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush coder module_name –minor –ignore –no-empty –reviews=sniffer,security,sql,comment,i18n,style –ignorename –ignores-pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, Drupal, window, document, undefined) { | |
// Bootstrap Remove empty cols in rows. | |
Drupal.behaviors.removeEmptyCols = { | |
attach: function (context, settings) { | |
// Remove empty col-sm-4 and extend col-sm-8 with col-sm-12. | |
// You will need to add the parent class . like node-teaser to limit the each function. | |
$(".row").each(function() { | |
if ($(this).children('.col-sm-4').html().trim().length === 0) { | |
$(this).children('.col-sm-8').addClass('col-sm-12'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## On Development | |
# NOTE: make sure that you commented variables with force override in local.settings.php for Varbase 7.x-3.x | |
# ------------------------------------------------------------ | |
# One line commands. | |
# ------------------------------------------------------------ | |
drush vset error_level 2;drush vset preprocess_js 0;drush vset preprocess_css 0;drush vset cache 0;drush vset page_compression 0;drush vset block_cache 0;drush vset file_temporary_path '/tmp';drush en field_ui views_ui context_ui ds_ui dblog -y; | |
## On Development | |
# ------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your location block(s): | |
# | |
# include cors_support; | |
# | |
# A limitation to this method is that Nginx doesn't currently send headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /proc/mounts | |
OR | |
cat /proc/self/mounts | |
mount | |
mount -l | |
df -aTh |
NewerOlder