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
$ sudo tlp-stat | |
--- TLP 0.8 -------------------------------------------- | |
+++ Configured Settings: /etc/default/tlp | |
TLP_ENABLE=1 | |
TLP_DEFAULT_MODE=AC | |
DISK_IDLE_SECS_ON_AC=0 | |
DISK_IDLE_SECS_ON_BAT=2 | |
MAX_LOST_WORK_SECS_ON_AC=15 | |
MAX_LOST_WORK_SECS_ON_BAT=60 |
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
# For each database: | |
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | |
# For each table: | |
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
# For each column: | |
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
# (Don’t blindly copy-paste this! The exact statement depends on the column type, maximum length, and other properties. The above line is just an example for a `VARCHAR` column.) |
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
<?php | |
$dbname = 'your-database-name'; | |
mysql_connect('your-database-hostname', 'your-database-username', 'your-database-password'); | |
mysql_query("ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"); | |
$result = mysql_query("SHOW TABLES FROM `$dbname`"); | |
while($row = mysql_fetch_row($result)) { | |
$query = "ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
mysql_query($query); | |
$query = "ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
mysql_query($query); |
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
Most of the case, i never / dont need to open the default databases such information_schema, cdcol..etc | |
So why not just hide this from phpmyadmin ? Open C:\xampp\phpMyAdmin\config.inc.php and add code below inside that file | |
/* hide database from phpmyadmin */ | |
$cfg['Servers'][$i]['hide_db'] = '^(information_schema|mysql|phpmyadmin|cdcol|foo|webauth)$'; | |
Reload apache and mysql to see the result in phpmyadmin.. ;) |
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
#!/bin/bash | |
DB_BACKUP="/home/backup/mysql_backup" | |
DB_USER="root" | |
DB_PASSWD="replace_this_text_with_your_mysql_root_password_if_needed" | |
HN=`hostname | awk -F. '{print $1}'` | |
# Clear out backup directory | |
rm -rf $DB_BACKUP/*.sql |
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
define('WP_PROXY_HOST', '192.168.100.252'); | |
define('WP_PROXY_PORT', '8080'); | |
define('WP_PROXY_USERNAME', ''); | |
define('WP_PROXY_PASSWORD', ''); | |
define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, 127.0.0.1'); |
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
define('WP_PROXY_HOST', '192.168.100.252'); | |
define('WP_PROXY_PORT', '8080'); | |
define('WP_PROXY_USERNAME', ''); | |
define('WP_PROXY_PASSWORD', ''); | |
define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, 127.0.0.1'); |
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
sudo ifconfig wlan0 down | |
sudo iwconfig wlan0 mode monitor | |
sudo ifconfig wlan0 up | |
sudo iwconfig wlan0 mode managed |
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
Super+W – Spread mode, zoom out on all windows in all workspaces | |
Super+S – Expo mode (for everything), zooms out on all the workspaces and lets you manage windows |
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
$ sudo gedit /etc/environment | |
$ source /etc/environment | |
$ echo $PATH |