Adding a directory to $PATH in CentOS?

It’s not a good idea to edit /etc/profile for things like this, because you’ll lose all your changes whenever CentOS publishes an update for this file. This is exactly what /etc/profile.d is for: echo ‘pathmunge /usr/lib/ruby-enterprise/bin’ > /etc/profile.d/ree.sh chmod +x /etc/profile.d/ree.sh Log back in and enjoy your (safely) updated $PATH: echo $PATH /usr/lib/ruby-enterprise/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin which ruby … Read more

Document Root PHP

Try this yourself and find that they are not exactly the same. $_SERVER[‘DOCUMENT_ROOT’] renders an actual file path (on my computer running as it’s own server, C:/wamp/www/ HTML’s / renders the root of the server url, in my case, localhost/ But C:/wamp/www/hello.html and localhost/hello.html are in fact the same file

adb shell su works but adb root does not

By design adb root command works in development builds only (i.e. eng and userdebug which have ro.debuggable=1 by default). So to enable the adb root command on your otherwise rooted device just add the ro.debuggable=1 line to one of the following files: If you want adb shell to start as root by default – then add ro.secure=0 as well. Alternatively you could use modified adbd binary (which does not check for ro.debuggable) From https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp

adb shell su works but adb root does not

By design adb root command works in development builds only (i.e. eng and userdebug which have ro.debuggable=1 by default). So to enable the adb root command on your otherwise rooted device just add the ro.debuggable=1 line to one of the following files: If you want adb shell to start as root by default – then add ro.secure=0 as well. Alternatively you could use modified adbd binary (which does not check for ro.debuggable) From https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp

MySQL root password change

I found it! I forgot to hash the password when I changed it. I used this query to solve my problem: update user set password=PASSWORD(‘NEW PASSWORD’) where user=’root’; I forgot the PASSWORD(‘NEW PASSWORD’) and just put in the new password in plain text.