Add new notes, fix minor issues
This commit is contained in:
parent
6e9a488e5b
commit
910f531207
@ -28,7 +28,7 @@ function Title() {
|
||||
let currRoot: SiteSubPages = SiteMap.subpages;
|
||||
let title: string | null = null;
|
||||
if (pagePath !== '/') {
|
||||
const subPaths = pagePath.split('/');
|
||||
const subPaths = pagePath.split('?')[0].split('#')[0].split('/');
|
||||
for (const p of subPaths.slice(1, subPaths.length)) {
|
||||
splitPath.push({ name: currRoot[p].title, path: p });
|
||||
|
||||
|
@ -21,7 +21,7 @@ Product/Service-specific Extensions:
|
||||
- [Firefox Source Docs](https://firefox-source-docs.mozilla.org/)
|
||||
|
||||
### Reducing UI element padding
|
||||
- Go to [about:config](about:config)
|
||||
- Go to the browser's [about\:config](#) page
|
||||
- Set `browser.uidensity` equal to `1`
|
||||
|
||||
## Safari
|
||||
|
68
notes/lua.md
Normal file
68
notes/lua.md
Normal file
@ -0,0 +1,68 @@
|
||||
# Lua Programming Language
|
||||
|
||||
## Lua 5.4 C API
|
||||
|
||||
|
||||
## Lua 5.4 Bytecode
|
||||
|
||||
> [!note]
|
||||
> These are **unstable** and may differ in different versions of the language.
|
||||
> They are not part of the language specification but an implementation detail, which in this case is the reference implementation.
|
||||
|
||||
> [!note]
|
||||
> The reference implementation used to have a stack based but now uses a register based VM similar to how modern real computer architectures.
|
||||
|
||||
The instructions are 32 bits wide; every instruction has an opcode that takes up 7 bits, which leaves out 25 bits for the addresses and values.
|
||||
|
||||
The instructions work with three register referred to as: A, B, C; each are of length 8 bits.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>31</th><th>...</th><th>24</th><th>23</th><th>...</th><th>16</th><th>15</th><th>14</th><th>...</th><th>7</th><th>6</th><th>...</th><th>0</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>iABC</td>
|
||||
<td colspan='3' style='text-align:center'>C (8 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>B (8 bits)</td>
|
||||
<td style='text-align:center'>k (1 bit)</td>
|
||||
<td colspan='3' style='text-align:center'>A (8 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>OP (7 bits)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iABx</td>
|
||||
<td colspan='7' style='text-align:center'>B (17 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>A (8 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>OP (7 bits)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iAsBx</td>
|
||||
<td colspan='7' style='text-align:center'>signed B 17 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>A (8 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>OP (7 bits)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iAx</td>
|
||||
<td colspan='10' style='text-align:center'>Ax (25 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>OP (7 bits)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sJ</td>
|
||||
<td colspan='10' style='text-align:center'>signed jump address (25 bits)</td>
|
||||
<td colspan='3' style='text-align:center'>OP (7 bits)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
```lua
|
||||
-- arithmetic to calculate the lengths used from https://www.lua.org/source/5.4/lopcodes.h.html
|
||||
A = 8
|
||||
B = 8
|
||||
C = 8
|
||||
Bx = A + B + 1 -- 17
|
||||
Ax = A + Bx -- 25
|
||||
sJ = A + Bx -- 25
|
||||
```
|
||||
This page contains excerpts from Lua's source code which is the copyright of Lua.org, PUC-Rio and is licensed under the MIT License.
|
||||
[lua.org/license.html](https://www.lua.org/license.html)
|
40
notes/os.md
Normal file
40
notes/os.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Operating Systems
|
||||
## Windows
|
||||
|
||||
### Package Managers
|
||||
|
||||
- Chocolatey
|
||||
- requires Administrator permissions
|
||||
- Winget
|
||||
- comes with Windows
|
||||
- (it doesn't work half of the time for me)
|
||||
|
||||
### Mounting ISO, CUE images
|
||||
|
||||
Windows versions 8 and above natively support mounting ISOs. However CUE images are not supported.
|
||||
WinCDEmu is a lightweight, open-source disc emulator that supports mounting CUE, NRG, IMG, ISO, etc. images.
|
||||
- [WinCDEmu Website](https://wincdemu.sysprogs.org/)
|
||||
- [Source (GitHub)](https://github.com/sysprogs/WinCDEmu)
|
||||
- [Portable Version](https://wincdemu.sysprogs.org/portable/)
|
||||
|
||||
### Master Control Panel / God Mode
|
||||
(Misnomer; you probably won't use this either)
|
||||
|
||||
Shows a list of all the available settings on Windows in a single view.
|
||||
|
||||
Open it by exceuting the following command or saving it as a shortcut: `explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}`
|
||||
|
||||
## MacOS
|
||||
|
||||
### Package Manager
|
||||
|
||||
- [HomeBrew](https://brew.sh)
|
||||
- package manager everyone uses but it is noticeably slow
|
||||
|
||||
### Video Players
|
||||
|
||||
- IINA
|
||||
- video player based on mpv with native macOS UI
|
||||
- mpv
|
||||
- mpv doesn't have a brew cask for Apple silicon; stolen-mpv exists but it is x86 only
|
||||
- mpv brew formula is the cli tool which works pretty well but it is not as nice as packaged applications
|
@ -15,7 +15,9 @@
|
||||
"react-markdown": "^9.0.0",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"remark-directive": "^3.0.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"remark-github-admonitions-to-directives": "^2.0.0",
|
||||
"uri-js": "^4.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,10 +1,12 @@
|
||||
import Layout from '../../components/layout';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { monokaiSublime as hlTheme } from 'react-syntax-highlighter/dist/cjs/styles/hljs';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeRaw from 'rehype-raw';
|
||||
import remarkDirective from 'remark-directive';
|
||||
import remarkGithubAdmonitionsToDirectives from 'remark-github-admonitions-to-directives';
|
||||
|
||||
import Layout from '../../components/layout';
|
||||
import readMarkdown from '../../lib/read-markdown';
|
||||
import NotesInfo from '../../public/notes.json';
|
||||
|
||||
@ -19,7 +21,7 @@ interface Notes {
|
||||
|
||||
function Markdown({ content }: any) {
|
||||
return <ReactMarkdown
|
||||
remarkPlugins={[remarkGfm]}
|
||||
remarkPlugins={[remarkGithubAdmonitionsToDirectives, remarkDirective]}
|
||||
rehypePlugins={[rehypeRaw]}
|
||||
components={{
|
||||
code({ node, className, children, ...props }) {
|
||||
|
@ -8,14 +8,14 @@ function traverseMap(head: Site, cwd = '', depth = 0) {
|
||||
return [];
|
||||
let elements = [];
|
||||
for (const [slug, info] of Object.entries(head.subpages)) {
|
||||
if (slug === 'sitemap')
|
||||
continue;
|
||||
const path = `${cwd}/${slug}`;
|
||||
const children = (<><dl style={{marginLeft: '3rem'}}> {traverseMap(info, path, depth + 1)}</dl></>);
|
||||
elements.push(<>
|
||||
<>
|
||||
<dt>{info.title}</dt>
|
||||
<dd><Link href={path}>{path}</Link></dd>
|
||||
<dd><Link href={path}>paulw.xyz{path}</Link></dd>
|
||||
{children}
|
||||
</>
|
||||
</>);
|
||||
}
|
||||
return elements;
|
||||
|
@ -1 +1 @@
|
||||
{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:38:33.757Z"},"browsers":{"title":"Web Browsers","mtime":"2024-04-20T19:48:29.981Z"}}
|
||||
{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:59:46.944Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"}}
|
@ -1 +1 @@
|
||||
{"title":"PaulW.XYZ","subpages":{"posts":{"title":"Posts","subpages":{}},"notes":{"title":"Notes","subpages":{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:38:33.757Z"},"browsers":{"title":"Web Browsers","mtime":"2024-04-20T19:48:29.981Z"}}},"about":{"title":"About"},"sitemap":{"title":"Site Map"}}}
|
||||
{"title":"PaulW.XYZ","subpages":{"posts":{"title":"Posts","subpages":{}},"notes":{"title":"Notes","subpages":{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:59:46.944Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"}}},"about":{"title":"About"},"sitemap":{"title":"Site Map"}}}
|
Loading…
Reference in New Issue
Block a user