Skip to content

Commit

Permalink
chore: upgrade docusaurus to v3 and other related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Dec 1, 2023
1 parent 9a06b58 commit 87d7d2d
Show file tree
Hide file tree
Showing 19 changed files with 4,957 additions and 3,000 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
- name: Install NPM packages
run: npm install

- name: Apply customizations
run: |
sed -i.bak 's/f6f8fa/f6f6f6/gI' node_modules/prism-react-renderer/themes/github/index.cjs.js
- name: Build website
run: npm run build

Expand Down
3 changes: 2 additions & 1 deletion docs/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ keywords: ["linux", "unix", "commandline", "shell", "ssh", "sed", "grep", "wget"
---

## Navigating around

Print current working directory:
```bash
pwd
Expand Down Expand Up @@ -849,7 +850,7 @@ Flags | Description
-e | with protocol option.

If you are looking for more advanced and secure backup options, check out
<https://borgbackup.readthedocs.io/en/stable/>
https://borgbackup.readthedocs.io/en/stable/

## Processes
See processes in the current shell
Expand Down
2 changes: 1 addition & 1 deletion docs/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ partition number and first sector. Here we want to create a partition size of
- Save the changes by running the `w` command.

### Resources
- <https://linuxize.com/post/fdisk-command-in-linux/>
- https://linuxize.com/post/fdisk-command-in-linux/
8 changes: 4 additions & 4 deletions docs/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ git rm --cached folder/
```

Blank lines or the lines that start with `#` are ignored. You can visit this
page <https://github.com/github/gitignore>, where GitHub maintains a list of
page https://github.com/github/gitignore, where GitHub maintains a list of
*.gitignore* for various popular projects.

Remove a file from staging environment:
Expand Down Expand Up @@ -448,7 +448,7 @@ pick ec716b0 added feature y
pick 4baeaaf a patch for feature y
```

### Cherry-pick
### cherry-pick

git `cherry-pick` enables arbitrary Git commits to be picked by reference and
appended to the current working `HEAD`. Let's assume we have following branch
Expand Down Expand Up @@ -655,6 +655,6 @@ git lfs migrate import --verbose --include="*.pdf" --include-ref=HEAD --exclude-

## Resources

- <https://git-scm.com/book/en/v2>
- <https://github.com/pluralsight/git-internals-pdf>
- https://git-scm.com/book/en/v2
- https://github.com/pluralsight/git-internals-pdf
- [Removing sensitive data from Git/GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository)
2 changes: 1 addition & 1 deletion docs/gnuplot.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ gnuplot> replot
</picture>

## Resources
- <http://www.gnuplot.info>
- http://www.gnuplot.info
4 changes: 2 additions & 2 deletions docs/hpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sudo apt install libfftw3-3
```

**LAPACK, BLAS, TMGLIB**
Resources: <http://www.netlib.org/lapack/>
Resources: http://www.netlib.org/lapack/
```bash
wget https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.10.0.tar.gz
tar -xzvf v3.10.0.tar.gz
Expand Down Expand Up @@ -89,4 +89,4 @@ source ~/.bashrc
```

## Resources
- <https://web.corral.tacc.utexas.edu/CompEdu/pdf/stc/EijkhoutIntroToHPC.pdf>
- https://web.corral.tacc.utexas.edu/CompEdu/pdf/stc/EijkhoutIntroToHPC.pdf
10 changes: 5 additions & 5 deletions docs/latex.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ cd ${CWD}


### Resources
- <https://www.overleaf.com/learn>
- <https://texfaq.org/> (On [GitHub](https://github.com/texfaq))
- <https://www.learnlatex.org/en/> (On [GitHub](https://github.com/learnlatex))
- <https://latexcolor.com/>
- <https://github.com/pranabdas/LaTeX>
- https://www.overleaf.com/learn
- https://texfaq.org/ (On [GitHub](https://github.com/texfaq))
- https://www.learnlatex.org/en/ (On [GitHub](https://github.com/learnlatex))
- https://latexcolor.com/
- https://github.com/pranabdas/LaTeX
2 changes: 1 addition & 1 deletion docs/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ module-whatis | follow with a help string, to be printed whenever the user issue

## Resources

- <https://www.prl.res.in/prl-eng/hpc/getting_started/creating_custom_modules>
- https://www.prl.res.in/prl-eng/hpc/getting_started/creating_custom_modules
27 changes: 23 additions & 4 deletions docs/network-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ reveal a lot of metadata.
</picture>

## Address Resolution Protocol (ARP)

This is used by the devices in the same LAN or Wi-Fi network to discover each
other. Check the devices' IP address and MAC address mapping in your network:
```bash
Expand Down Expand Up @@ -100,20 +101,23 @@ return the IP address of a forged bank website. Currently there is no encryption
used in DNS layer. It is only protected by the TCP/UDP layer encryption
therefore vulnerable to man-in-the-middle position attacks. Remember, last time
you connected to a Wi-Fi network in a restaurant, you tried to visit say
www.google.com, but first it send you a form asking to give you name, phone
number, once you enter, it redirects to intended www.google.com (?). It is even
*google.com*, but first it send you a form asking to give you name, phone
number, once you enter, it redirects to intended *google.com* (?). It is even
abused by some authorities with help of ISPs.

## Lynis
Download Lynis [https://cisofy.com/lynis/](https://cisofy.com/lynis/#download)

Download Lynis [https://cisofy.com/lynis/](https://cisofy.com/lynis/#download).
Un-tar the package:

```bash
tar -zxvf lynis-3.0.0.tar.gz
cd lynis
./lynis audit system
```

## Nmap

```bash
# On Ubuntu
sudo apt install nmap
Expand All @@ -126,6 +130,7 @@ brew install nmap
```

Sample scan report:

```bash
$ sudo nmap -Pn ec2-xx-xxx-xx-xx.ap-southeast-1.compute.amazonaws.com
Starting Nmap 7.70 ( https://nmap.org ) at 2020-07-23 10:02 UTC
Expand All @@ -145,6 +150,7 @@ By default it scans 1000 ports, there are 65,535 possible ports. If you have
IPv6 addresses, use `-6` flag.

Operating system detection:

```bash
$ nmap -O ec2-xx-xxx-xx-xx.ap-southeast-1.compute.amazonaws.com
Starting Nmap 7.70 ( https://nmap.org ) at 2020-07-23 09:50 UTC
Expand All @@ -169,6 +175,7 @@ Nmap done: 1 IP address (1 host up) scanned in 3.89 seconds
Unfortunately, it did not guess correctly the linux version.

Service version detection:

```bash
$ sudo nmap -sV ec2-xx-xxx-xx-xx.ap-southeast-1.compute.amazonaws.com
Starting Nmap 7.70 ( https://nmap.org ) at 2020-07-23 09:58 UTC
Expand All @@ -186,17 +193,21 @@ Nmap done: 1 IP address (1 host up) scanned in 14.09 seconds
```
This time not only it detected services, it also correctly identified the server Operating system. Scan a single port `-p 80` or the whole range `-p 1-65535`. We can get combine all methods using `-A`.
```bash
sudo nmap -A -v -p 80 ec2-xx-xxx-xx-xx.ap-southeast-1.compute.amazonaws.com
```
## nikto
Nikto is a web vulnerability test utility. If you are on Ubuntu, you can simply install from the package manager.
```bash
sudo apt install nikto
```
If you are on RHEL or CentOS, you need to manually install.
```bash
sudo dnf install perl
git clone https://github.com/sullo/nikto
Expand All @@ -207,6 +218,7 @@ perl nikto.pl -h www.example.com
There are additional dependencies for full functionality, please check the nikto
documentation. Here is a sample output on a default apache server on latest
RHEL:
```bash
$ perl nikto.pl -h http://xx.xxx.xx.xx
- Nikto v2.1.6
Expand Down Expand Up @@ -239,6 +251,7 @@ Now you get some idea to strengthen the security of your server. For example, my
server does not need `TRACE`, `POST` and `OPTIONS` HTTP methods.
We can add following to `/etc/httpd/conf/httpd.conf`
```bash
<Directory />
<LimitExcept GET HEAD>
Expand All @@ -250,6 +263,7 @@ TraceEnable Off
```
Followed by:
```bash
sudo mv /etc/httpd/conf.d/manual.conf /etc/httpd/conf.d/manual.conf.bak
sudo mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.bak
Expand All @@ -260,31 +274,36 @@ sudo systemctl restart httpd
Now if we run nikto again, we will see that some of the issues are resolved.
## Wireshark
Installing wireshark in Ubuntu:
```bash
sudo apt install wireshark
```
During installation, it asked me configuration options. In case you need to
reconfigure wireshark later or manually:
```bash
sudo dpkg-reconfigure wireshark-common
```
Add user:
```bash
sudo adduser $USER wireshark
```
Now we can launch wireshark:
```bash
wireshark &
```
:::tip
If you are learning WireShark, there are various sample captures available at
<https://packetlife.net/captures/>. You can open them in CloudShark from your
https://packetlife.net/captures/. You can open them in CloudShark from your
browser, or download and open in WireShark.
:::
10 changes: 5 additions & 5 deletions docs/pgp.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ gpg -d file.txt.gpg > file-copy.txt

## Using PGP encryption with VIM editor

Install this plugin <https://github.com/jamessan/vim-gnupg>
Install this plugin https://github.com/jamessan/vim-gnupg

I experienced a bug: sometimes two characters of second line is missing or
hidden. To resolve this issue, add this to your `.vimrc` file:
Expand All @@ -150,7 +150,7 @@ let g:GPGDefaultRecipients=["default@example.com"]

## Resources

- <https://protonmail.com/blog/what-is-pgp-encryption/>
- <https://www.gnupg.org/gph/en/manual.html>
- <https://emailselfdefense.fsf.org/>
- <https://blog.ghostinthemachines.com/2015/03/01/how-to-use-gpg-command-line/>
- https://protonmail.com/blog/what-is-pgp-encryption/
- https://www.gnupg.org/gph/en/manual.html
- https://emailselfdefense.fsf.org/
- https://blog.ghostinthemachines.com/2015/03/01/how-to-use-gpg-command-line/
8 changes: 4 additions & 4 deletions docs/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ from the right-click context menu, see the metadata and remove them.
</div>

There is a cross-platform exifdata removal tool particularly for images -
<https://github.com/exiftool/exiftool>. If you are on macOS, you can install it
https://github.com/exiftool/exiftool. If you are on macOS, you can install it
using homebrew.


Expand Down Expand Up @@ -96,7 +96,7 @@ When you use a VPN, your traffic is visible to your VPN provider, it is
important whom you can trust. If you are on a public WiFi, it is always a good
idea to use a trustable VPN service. I believe ProtonVPN is a good option.
Today's internet is full of trackers, using a VPN will help you hide your real
IP address. You can also use <https://www.startpage.com> along with its
IP address. You can also use https://www.startpage.com along with its
anonymous view for the same purpose. TOR is another option, however many popular
websites may not function optimally via TOR.

Expand All @@ -115,11 +115,11 @@ more metadata than Signal.
### Browser and search engines

Use privacy respecting web browsers like Mozilla Firefox or Tor, and search
engines like <https://www.startpage.com> or duckduckgo. Clear your browsing
engines like https://www.startpage.com or duckduckgo. Clear your browsing
history and cookies regularly or set to clear when you quit browser.


### Resources

- [macOS Security and Privacy Guide](https://github.com/drduh/macOS-Security-and-Privacy-Guide)
- <https://blog.torproject.org/browser-fingerprinting-introduction-and-challenges-ahead/>
- https://blog.torproject.org/browser-fingerprinting-introduction-and-challenges-ahead/
2 changes: 1 addition & 1 deletion docs/regex.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ same as `+`; `{0,}` same as `*`. Validate US phone numbers:
We use `()` to group. `/(abc)+/` will match abc or abcabc or abcabcabc.

### Resources
Online Regex Playground: <https://regexr.com>
Online Regex Playground: https://regexr.com
12 changes: 6 additions & 6 deletions docs/resources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Resources
---

- <https://kernelnewbies.org/>
- <https://www.linuxfromscratch.org/lfs/view/stable/>
---
title: Resources
---

- https://kernelnewbies.org/
- https://www.linuxfromscratch.org/lfs/view/stable/
4 changes: 2 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sudo apt install --no-install-recommends \
wget
```

Oh-my-bash: <https://github.com/ohmybash/oh-my-bash>
Oh-my-bash: https://github.com/ohmybash/oh-my-bash
```bash
git clone https://github.com/ohmybash/oh-my-bash.git ~/.oh-my-bash
```
Expand Down Expand Up @@ -84,7 +84,7 @@ following path, and rebuilding the font cache:
mkdir ~/.local/share/fonts
sudo fc-cache -f -v ~/.local/share/fonts
```
<https://fonts.google.com> has a large collection of awesome fonts. Choose to
https://fonts.google.com has a large collection of awesome fonts. Choose to
your liking.

If you are going to access your system remotely via SSH, install the SSH server.
Expand Down
2 changes: 1 addition & 1 deletion docs/shell-scripting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ var2=$(echo "scale=7;${var}/2" | bc)
## Learn more
- *Learning the bash Shell: Unix Shell Programming* by *C. Newham*.
- *Linux Shell Scripting With Bash* by *K. O. Burtch*.
- <https://tldp.org/guides.html>
- https://tldp.org/guides.html
2 changes: 1 addition & 1 deletion docs/wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ wsl --terminate {DistributionName}

### Resources

- <https://docs.microsoft.com/en-us/windows/wsl/>
- https://docs.microsoft.com/en-us/windows/wsl/

0 comments on commit 87d7d2d

Please sign in to comment.