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.

:wq! command in vim

If you don’t have permission to the file (e.g. you don’t own the file), then it will not force the write. If you do have permission to the file, but it is a read-only file, then you can force-write it. It’s as if you first change the file mode to writable, write your changes, and …

Read more