This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| TMP_HEX=$(mktemp) | |
| TMP_BIN=$(mktemp) | |
| # Listing 19-1 | |
| cat > "$TMP_HEX" <<EOF | |
| 83 EC 20 | |
| 31 D2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="page1"> | |
| <h1>First Page</h1> | |
| <p>This page contains some text.</p> | |
| </div> | |
| <div id="page2" hidden> | |
| <h1>Second Page</h1> | |
| <p>This page contains a <a href="">link</a>.</p> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const USERNAME = 'ADMIN_EMAIL' | |
| const PASSWORD = 'ADMIN_PASSWORD' | |
| const pb = new PocketBase('http://127.0.0.1:8090') | |
| const authData = await pb.admins.authWithPassword(USERNAME, PASSWORD) | |
| console.log(authData) | |
| const root = ReactDOM.createRoot(document.getElementById('root')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <winuser.h> | |
| #pragma comment(lib, "user32.lib") | |
| int main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| module.paths.push('./_remake') | |
| const nanoidGenerate = require('nanoid/generate') | |
| const dotRemake = require('utils/dot-remake') | |
| dotRemake.writeDotRemake({ | |
| port: 3000, | |
| sessionSecret: nanoidGenerate('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| class Dog { | |
| constructor (name) { | |
| this.name = name | |
| } | |
| speak () { | |
| return `${this.name}: bark!` | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Note: to compile for 64-bit, open the "x64 Native Tools Command Prompt" | |
| all: listing_20-1.obj listing_20-2.obj listing_20-4.obj listing_20-5.obj nonvirtual.obj virtual.obj | |
| listing_20-1.obj: listing_20-1.cpp | |
| cl /c listing_20-1.cpp | |
| listing_20-2.obj: listing_20-2.cpp | |
| cl /c listing_20-2.cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| all: listing_6-01.exe listing_6-02.obj listing_6-06.obj listing_6-08.obj listing_6-10.obj listing_6-12.obj listing_6-14.obj listing_6-16.obj listing_6-18.obj listing_6-18.o listing_6-20.obj listing_6-22.obj listing_6-24.obj listing_6-26.obj listing_6-29.obj | |
| listing_6-01.exe: listing_6-01.c | |
| cl listing_6-01.c | |
| listing_6-02.obj: listing_6-02.c | |
| cl /c listing_6-02.c | |
| listing_6-06.obj: listing_6-06.c | |
| cl /c listing_6-06.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main() | |
| { | |
| int c; | |
| printf ("Hello.\n"); | |
| exit (0); | |
| } |