Entries Categorized as 'Technology'

How To Remove a Package Without the Dependencies (yum/rpm)

Author: , January 9th, 2018

To remove a specific package without its dependencies use rpm: 1 2 rpm -qa | grep pecl rpm -e –nodeps php55-pecl-jsonc php55-pecl-jsonc-devel rpm -qa | grep pecl rpm -e –nodeps php55-pecl-jsonc php55-pecl-jsonc-devel As always, YMMV!

How To Fix MacOSX Yosemite 10.10 Memory Leaks via SMC and PRAM Resets

Author: , January 4th, 2018

I was running out of memory constantly on Yosemite 10.10.5 and found the following article: https://discussions.apple.com/message/26929324?start=555&tstart=0 Edited and reposted without permission below… Disconnect any external or secondary monitors, if any is present. The video memory allocation leak can also happen if you have a system with an integrated card, like Intel, with no external monitors […]

How To Upgrade MySQL from 5.5 to 5.7 on CentOS/AWS Linux

Author: , December 7th, 2017

START: Server version: 5.5.54-log MySQL Community Server (GPL) FINISH: Server version: 5.7.20-log MySQL Community Server (GPL) 1 2 3 4 5 6 mysql –execute="SET GLOBAL innodb_fast_shutdown=0;" service mysqld stop yum remove mysql mysql-* yum install mysql57-devel mysql57-server mysql57-test service mysqld start mysql_upgrade mysql –execute=”SET GLOBAL innodb_fast_shutdown=0;” service mysqld stop yum remove mysql mysql-* yum install […]

How To Change the root Password on MacOS High Sierra

Author: , November 28th, 2017

Launch System Preferences Select Users & Groups Select Login Options Select Join next to Network Account Server Select Open Directory Utility Click the lock and enter your password to make changes In the menu bar of Directory Utility, select Change Root Password Create a strong, unique password

How To Redirect to https in Apache Using mod_rewrite

Author: , November 17th, 2017

1 2 3 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

How To Create a Single Custom Post Type Template for Genesis in WordPress

Author: , October 21st, 2017

wordpress/wp-content/themes/yourTheme/single-yourCPTslug.php 1 2 3 4 5 6 7 8 9 10 11 add_action( ‘genesis_before_entry_content’, ‘display_custom_fields’ ); function display_custom_fields() {     $jobTitle = get_field(’_jobTitle’) ?: ‘-’;     print <<<EOT     <br style="clear:both"/>     <p>Job Title: $jobTitle</p> EOT; }   // Genesis Loop genesis(); add_action( ‘genesis_before_entry_content’, ‘display_custom_fields’ ); function display_custom_fields() { $jobTitle = […]

How to Manage Remote Branches in Git

Author: , October 19th, 2017

Git does not download all branches unless you tell it to. Until then, they are ‘remote’ branches. Use -r to list remote branches: git branch -r git fetch –all git pull –all If you see this error: fatal: The current branch CT-37 has no upstream branch. Push the current branch and set the remote as […]

How To Revert a Single File in Git to Match the Master Branch

Author: , October 19th, 2017

If you want to revert the file to its state in master: git checkout origin/master [filename]

How To Clean Up Lost Disk Space in MacOS High Sierra

Author: , October 12th, 2017

Reposted from https://mcbguru.blog/2017/10/12/macos-high-sierra-disk-space/ The new APFS creates snapshots during local Time Machine backups, and this can mean, especially if you’be been dealing with some large files, that when you delete them and empty the wastebasket, you don’t get your disk space back. The key is to look at your local backups, and the easiest method […]

How To get haproxy status via socket using cli

Author: , October 6th, 2017

echo “show stat” | nc -U /var/lib/haproxy/stats | cut -d “,” -f 1,2,5-11,18,24,27,30,36,50,37,56,57,62 | column -s, -t