aboutsummaryrefslogtreecommitdiff
path: root/docs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/misc')
-rw-r--r--docs/misc/index.md10
-rw-r--r--docs/misc/patch.md24
2 files changed, 17 insertions, 17 deletions
diff --git a/docs/misc/index.md b/docs/misc/index.md
index 15d0ea08..7d73569b 100644
--- a/docs/misc/index.md
+++ b/docs/misc/index.md
@@ -58,10 +58,10 @@ when idle. So far we have use processor.max\_cstate=2 or idle=halt in
GRUB. These consume power. Stop using them!
Be root\
-**\$ su -**
+ $ su -
Installed powertop:\
-**\# pacman -S powertop**
+ # pacman -S powertop
and added the following to /etc/systemd/system/powertop.service :
@@ -79,8 +79,8 @@ and added the following to /etc/systemd/system/powertop.service :
WantedBy=multi-user.target
Finally, as root do that:\
-**\# systemctl enable powertop**\
-**\# systemctl start powertop**
+ # systemctl enable powertop
+ # systemctl start powertop
The next time you boot the system, the buzz will be gone.
@@ -108,7 +108,7 @@ port on the dock and connect the other end to a 2nd system using your
USB Serial adapter.
On the 2nd system, you can try this (using GNU Screen):\
-**\$ sudo screen /dev/ttyUSB0 115200**
+ $ sudo screen /dev/ttyUSB0 115200
How to quit GNU Screen: Ctrl+A then release and press K, and then press
Y.
diff --git a/docs/misc/patch.md b/docs/misc/patch.md
index 54c82ecf..9f22f776 100644
--- a/docs/misc/patch.md
+++ b/docs/misc/patch.md
@@ -10,11 +10,11 @@ Apply a patch
=============
To apply a patch to a single file, do that in it's directory:\
-**\$ patch < foo.patch**
+ $ patch < foo.patch
Assuming that the patch is distributed in unified format identifying the
file the patch should be applied to, the above will work. Otherwise:\
-**\$ patch foo.txt < bar.patch**
+ $ patch foo.txt < bar.patch
You can apply a patch to an entire directory, but note the "p level".
What this means is that inside patch files will be the files that you
@@ -23,7 +23,7 @@ the files ane located on your own computer instead of on the computer
where the patch was created. 'p' level instructs the 'patch' utility
to ignore parts of the path name to identify the files correctly.
Usually a p level of 1 will work, so you would use:\
-**\$ patch -p1 < baz.patch**
+ $ patch -p1 < baz.patch
Change to the top level directory before running this. If a patch level
of 1 cannot identify the files to patch, then inspect the patch file for
@@ -31,14 +31,14 @@ file names. For example:\
**/home/user/do/not/panic/yet.c**
and you are working in a directory that contains panic/yet.c, use:\
-**\$ patch -p5 < baz.patch**
+ $ patch -p5 < baz.patch
You usually count one up for each path separator (forward slash) removed
from the beginning of the path, until you are left with a path that
exists in the current working directory. The count is the p level.
Removing a patch using the -R flag\
-**\$ patch -p5 -R < baz.patch**
+ $ patch -p5 -R < baz.patch
[Back to top of page.](#pagetop)
@@ -48,13 +48,13 @@ Create a patch with diff
========================
Diff can create a patch for a single file:\
-**\$ diff -u original.c new.c > original.patch**
+ $ diff -u original.c new.c > original.patch
For diff'ing a source tree:\
-**\$ cp -R original new**
+ $ cp -R original new
Do whatever you want in new/ and then diff it:\
-**\$ diff -rupN original/ new/ > original.patch**
+ $ diff -rupN original/ new/ > original.patch
[Back to top of page.](#pagetop)
@@ -68,10 +68,10 @@ git is something special.
Note: this won't show new files created.
Just make whatever changes you want to a git clone and then:\
-**\$ git diff > patch.git**
+ $ git diff > patch.git
Note the git revision that you did this with:\
-**\$ git log**
+ $ git log
Alternatively (better yet), commit your changes and then use:
$ git format-patch -N
@@ -88,10 +88,10 @@ it really is.
Now to apply that patch in the future, just git clone it again and do
with the git revision you found from above:\
-**\$ git reset --hard REVISIONNUMBER**
+ $ git reset --hard REVISIONNUMBER
Now put patch.git in the git clone directory and do:\
-**\$ git apply patch.git**
+ $ git apply patch.git
If you use a patch from git format-patch, then use **git am patch.git**
instead of **git apply patch.git**. git-am will re-create the commits