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
import PocketBase from 'pocketbase'; | |
const pb = new PocketBase('http://127.0.0.1:8090'); | |
const data = [ | |
{ | |
itemId: 'coffee', | |
imageId: 'coffee', | |
title: 'Coffee', | |
price: 0.99, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python | |
def derivative(f, h=1e-5): | |
def df(x): | |
return (f(x + h) - f(x)) / h | |
return df | |
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 python | |
import os | |
import sys | |
import json | |
import datetime | |
def usage(): | |
program = os.path.basename(sys.argv[0]) |
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
(define PAIR cons) | |
(define HEAD car) | |
(define TAIL cdr) | |
(define ISEMPTY null?) | |
(define reverse | |
(lambda (l result) | |
(if (ISEMPTY l) | |
result | |
(reverse (TAIL l) (PAIR (HEAD l) result))))) |
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) |