Skip to content

Commit d7ee458

Browse files
committed
init
0 parents  commit d7ee458

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1070
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*.log

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
3+
node_modules
4+
5+
lib/core/metadata.js
6+
lib/core/MetadataBlog.js
7+
8+
website/translated_docs
9+
website/build/
10+
website/yarn.lock
11+
website/node_modules
12+
website/i18n/*

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:lts
2+
3+
WORKDIR /app/website
4+
5+
EXPOSE 3000 35729
6+
COPY ./docs /app/docs
7+
COPY ./website /app/website
8+
RUN yarn install
9+
10+
CMD ["yarn", "start"]

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## rsapkf's notes
2+
3+
These are companion notes to my [dotfiles](https://https://github.com/rsapkf/dotfiles) where I keep short snippets of code, shell scripts, tricks and tips to remember stuff.
4+
5+
Notes are in [docs/](https://github.com/rsapkf/notes/tree/master/docs) directory.
6+
7+
[rsapkf.github.io/notes](https://rsapkf.github.io/notes/)
8+
9+
_Built using [Docusaurus](https://docusaurus.io/) v1.14.4._

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "3"
2+
3+
services:
4+
docusaurus:
5+
build: .
6+
ports:
7+
- 3000:3000
8+
- 35729:35729
9+
volumes:
10+
- ./docs:/app/docs
11+
- ./website/blog:/app/website/blog
12+
- ./website/core:/app/website/core
13+
- ./website/i18n:/app/website/i18n
14+
- ./website/pages:/app/website/pages
15+
- ./website/static:/app/website/static
16+
- ./website/sidebars.json:/app/website/sidebars.json
17+
- ./website/siteConfig.js:/app/website/siteConfig.js
18+
working_dir: /app/website

docs/about.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
id: about
3+
title: About
4+
---
5+
6+
These are companion notes to my [dotfiles](https://github.com/rsapkf/dotfiles) where I keep short snippets of code, shell scripts, tricks and tips to remember stuff.
7+
8+
_This site was created using [Docusaurus](https://docusaurus.io/) v1.14.4._

docs/bash.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: bash
3+
title: Bash
4+
---
5+
6+
- `<Ctrl-r>` - reverse-i-search.
7+
- `set -o vi` - enable vi mode in Bash.

docs/brian-brushwood.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: brian-brushwood
3+
title: Brain Brushwood
4+
---
5+
6+
Brian Brushwood Notes.

docs/browser.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
id: browser
3+
title: Browser
4+
---
5+
6+
## Firefox
7+
8+
- To set Firefox Developer Edition as `sensible-browser` on Linux:
9+
10+
First, add Firefox Developer Edition to `update-alternatives`:
11+
12+
```
13+
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox_dev/firefox/firefox 200
14+
```
15+
16+
(assuming the given executable path: `/opt/firefox_dev/firefox/firefox`)
17+
18+
Then, set it as `sensible-browser`:
19+
20+
```
21+
sudo update-alternatives --config x-www-browser
22+
```
23+
24+
- ### `about:config` settings
25+
26+
- `browser.bookmarks.openInTabClosesMenu` - true -> false
27+
- `browser.tabs.loadBookmarksInTabs` - false -> true
28+
- `browser.tabs.tabMinWidth` - 76 -> 100
29+
- `geo.enabled` - true -> false
30+
31+
32+
## Useful Shortcuts
33+
34+
- `<C-l>` to highlight the url bar.
35+
- `<Shift-t>` to get a dropdown menu of all open tabs.
36+
37+
38+
## Miscellaneous
39+
40+
- Chromium and Firefox DevTools allow you to take a fullsize screenshot of any webpage!

docs/css.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: css
3+
title: CSS
4+
---
5+
6+
- `position: sticky` doesn't work if `overflow` of parent is set.

docs/hacks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: hacks
3+
title: Hacks
4+
---
5+
6+
Hacks.

docs/html.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: html
3+
title: HTML
4+
---
5+
6+
## textarea
7+
8+
Good:
9+
10+
```html
11+
<textarea></textarea>
12+
```
13+
14+
Bad:
15+
16+
```html
17+
<textarea>
18+
</textarea>
19+
```

docs/irc.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
id: irc
3+
title: IRC
4+
---
5+
6+
## IRC Channels
7+
8+
- Freenode: `#python`, `##linux`
9+
- IRCHighway: `#ebooks`
10+
- Undernet: `#books`

docs/javascript.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
id: javascript
3+
title: JavaScript
4+
---
5+
6+
- Get random item from `possibleOptions` array:
7+
8+
`possibleOptions[Math.floor(Math.random()*possibleOptions.length)];`
9+
10+
11+
## Node/npm
12+
13+
- See all user installed packages:
14+
15+
`npm list -g --depth=0`

docs/linux.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
id: linux
3+
title: Linux
4+
---
5+
6+
## Some useful commands
7+
8+
- CPU temperature
9+
10+
`sensors | awk '/^CPU/ {print $2}'`
11+
12+
- free memory (2.2G/7.6G)
13+
14+
`free -h | awk '/^Mem:/ {print $3 "/" $2}'`
15+
16+
- Top 10 most memory intensive processes
17+
18+
`ps axch -o cmd:15,%mem --sort=-%mem | head`
19+
20+
- Top 10 most CPU intensive processes
21+
22+
`ps axch -o cmd:15,%cpu --sort=-%cpu | head`
23+
24+
- Does your Terminal Emulator support _Italics_?
25+
26+
`echo -e "\e[3m foo \e[23m"`
27+
28+
If this command doesn't print _`foo`_ (in _italics_), switch to a better Terminal Emulator.
29+
30+
## Desktop Entry Template
31+
32+
- [ArchWiki Page](https://wiki.archlinux.org/index.php/Desktop_entries)
33+
34+
- [freedesktop.org Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys)
35+
36+
Example .desktop file:
37+
38+
```
39+
[Desktop Entry]
40+
Name=pCloud
41+
GenericName=pCloud Client
42+
Exec=/opt/pcloud
43+
Terminal=false
44+
Type=Application
45+
Categories=Application;
46+
Comment=pCloud Cloud Storage
47+
```
48+
49+
## Useful Programs
50+
51+
- `man [program]`
52+
- `[program] --help`
53+
- `cat`
54+
- `less`
55+
- `echo`
56+
- `head`
57+
- `tail`
58+
- `alias`
59+
- `mkdir -p folder/{sub1,sub2}/{sub1,sub2,sub3}` - make directories/subdirectories quickly.
60+
- `chsh` - change login shell.
61+
- `grep` - pattern searching.
62+
- `fdisk` - disk partition utility.
63+
- `cfdisk` - disk partition utitlity.
64+
- `dd` - convert or copy a file, create bootable USBs from ISOs. **use cautiously. can destroy data irreversibly.** To monitor the progress of an operation, add the `status=progress` option to the command.
65+
- `wc` - print newline, word and byte counts for files.
66+
- `history` - show history.
67+
- `<space>man man` - don't add `man man` command to history.
68+
- `fc` - fix a long command that you messed up.
69+
- `!666` - run 666th command in history.
70+
- `!-n` - refer to the command _n_ lines back.
71+
- `!-1` / `!!` - refer to the previous command.
72+
- `sudo !!` - run previous command but append `sudo` at the beginning.
73+
- `[program] !!` - run previous command using [program].
74+
- `lsusb` - list USB devices.
75+
- `lsblk` - list information about block devices.
76+
- `uptime` - tell how long the system has been running.
77+
- `env` / `printenv` - list all environmental variables.
78+
- `free` - display amount of free and used memory in the system.
79+
- `df` - report file system disk space usage.
80+
- `du` - estimate file space usage.
81+
- `du -sh dir/` - check size of dir/ on disk.
82+
- `fc-list` - list available fonts.
83+
- `timedatectl` - control the system time and date.
84+
- `cat /etc/timezone` - (on Debian) print current timezone.
85+
- `xprop` - property displayer for X.
86+
- `shred` - overwrite the specified file(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.
87+
- `mount` - mount a filesystem.
88+
89+
### System Monitoring
90+
91+
- `ps` - report a snapshot of the current processes.
92+
- `ps aux | grep nginx` - search for 'nginx' in ps output.
93+
- `htop` - interactive process viewer.
94+
- `top` - display Linux processes.
95+
96+
### System Info
97+
98+
- `lsb_release -a` - print distribution-specific information.
99+
- `cat /etc/*release`
100+
- `uname -a` - print system information.
101+
- `cat /etc/fstab` - static file system information.
102+
103+
### Networking
104+
105+
- `vim /etc/resolv.conf` - change DNS server.
106+
- `ip` - show / manipulate routing, network devices, interfaces and tunnels.
107+
- `ip addr` - display IP addresses and property information.

docs/martin-gardner.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: martin-gardner
3+
title: Martin Gardner
4+
---
5+
6+
Martin Gardner Notes.

docs/misc.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
id: misc
3+
title: Miscellaneous
4+
---
5+
6+
### 5, 9, 14 Eyes countries
7+
8+
- 5 eyes: `Australia, Canada, NZ, UK, USA`
9+
- 9 eyes: `Denmark, France, Netherlands, Norway`
10+
- 14 eyes: `Germany, Belgium, Italy, Sweden, Spain`

docs/poems.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
id: poems
3+
title: Poems
4+
---
5+
6+
## Edgar Allan Poe
7+
- [Alone](https://www.poetryfoundation.org/poems/46477/alone-56d2265f2667d)
8+
9+
10+
## Robert Frost
11+
- [The Road Not Taken](https://en.wikipedia.org/wiki/The_Road_Not_Taken)
12+
- [Stopping by Woods on a Snowy Evening](https://www.poetryfoundation.org/poems/42891/stopping-by-woods-on-a-snowy-evening)
13+
14+
15+
## Charles Bukowski
16+
- [I Met A Genius](https://hellopoetry.com/poem/9394/i-met-a-genius/)
17+
- [So, You Want To Be A Writer]()
18+
19+
20+
## Rudyard Kipling
21+
- [If—](https://www.poetryfoundation.org/poems/46473/if---)

docs/python.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
id: python
3+
title: Python
4+
---
5+
6+
## Snippets
7+
8+
- `import antigravity` - xkcd.
9+
- `import this` - The Zen of Python.
10+
- `list[::-1]` / `list.reverse()` - reverse a list.

docs/rxvt-unicode.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: rxvt-unicode
3+
title: rxvt-unicode(urxvt)
4+
---
5+
6+
rxvt-unicode(aka urxvt) terminal emulator notes.

docs/text-editors.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: text-editors
3+
title: Text Editors
4+
---
5+
6+
## Gedit
7+
8+
- `<C-:>` to open emoji window.
9+
- Install Dracula Theme(https://draculatheme.com/gedit)
10+
11+
- Download the raw file:
12+
13+
`$ wget https://raw.githubusercontent.com/dracula/gedit/master/dracula.xml`
14+
15+
- Move the file to gedit styles folder:
16+
17+
`$ mv dracula.xml $HOME/.local/share/gedit/styles/`
18+
19+
- Activate in gedit's preferences dialog.

docs/tmux.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: tmux
3+
title: tmux
4+
---
5+
6+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
7+
8+
Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique.
9+
10+
Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis.
11+
12+
Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor.
13+
14+
Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur.

0 commit comments

Comments
 (0)