This file contains 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
--- src/sqlite3.c 2023-12-21 08:07:35.282320794 +0100 | |
+++ src/sqlite3patched.c 2023-12-21 08:07:35.292320783 +0100 | |
@@ -11108,6 +11108,17 @@ | |
} /* End of the 'extern "C"' block */ | |
#endif | |
#endif /* SQLITE3_H */ | |
+ | |
+/* Function prototypes of SQLite3 Multiple Ciphers */ | |
+SQLITE_PRIVATE int sqlite3mcCheckVfs(const char*); | |
+SQLITE_PRIVATE int sqlite3mcFileControlPragma(sqlite3*, const char*, int, void*); |
This file contains 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
npm prune --omit=dev | |
Zip -r nowplaying.zip . | |
aws lambda create-function --function-name nowplaying --zip-file \ | |
fileb://nowplaying.zip --handler index.handler --runtime nodejs18.x | |
aws lambda update-function-configuration --function-name nowplaying \ | |
--ephemeral-storage '{"Size": 10240}' | |
aws lambda update-function-configuration --function-name nowplaying \ | |
--environment "Variables={LIBSQL_SYNC_URL=$YOUR_DB_URL,LIBSQL_AUTH_TOKEN=$(turso db tokens create $YOUR_DB_NAME)}" |
This file contains 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 db = new Database("/tmp/local.db", { | |
syncUrl: "https://your-turso-db-link.turso.io", | |
authToken: "your-token-obtained-with-turso-db-tokens-create-command", | |
}); |
This file contains 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 req = new XMLHttpRequest(); | |
const url = 'https://edgemaildb-psarna.turso.io'; | |
req.open("POST", url); | |
const readonly_token = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicm8iLCJpYXQiOjE2ODE4MjkxNDMsImlkIjoiNzIyY2IyYTEtY2M3MC0xMWVkLWFkM2MtOGVhNWEwNjcyYmM2In0.T55UgAMs9vP2zMI_AhOiD2AONj_bsnDNRjZiBBWUb2gKU5MEjJoW8uHbtMGqpJ0312SULpsWTWdEJ886oSjGCQ"; | |
req.setRequestHeader('Authorization', 'Bearer ' + readonly_token) | |
const msg = JSON.stringify( | |
{ | |
statements: [{ | |
q: "SELECT date, sender, recipients, data FROM mail WHERE recipients = ? ORDER BY ROWID DESC LIMIT ? OFFSET ?", |
This file contains 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
pub async fn new() -> Result<Self> { | |
if std::env::var("LIBSQL_CLIENT_URL").is_err() { | |
let mut db_path = std::env::temp_dir(); | |
db_path.push("edgemail.db"); | |
let db_path = db_path.display(); | |
tracing::warn!("LIBSQL_CLIENT_URL not set, using a default local database: {db_path}"); | |
std::env::set_var("LIBSQL_CLIENT_URL", format!("file://{db_path}")); | |
} | |
let db = libsql_client::new_client().await?; | |
db.batch([ |
This file contains 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
Database | Source code | Precompiled library + tools (x86 arch) | |
---|---|---|---|
SQLite 3.41 | 2.5 MiB | 3 MiB | |
Postgres 15.2 | 28.4 MiB | 52 MiB |
This file contains 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 websockets | |
conn = await websockets.connect('ws://localhost:8123', subprotocols=["echo"]) | |
await conn.send("hello world!") | |
response = await conn.recv() | |
print(response) |
This file contains 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
use scylla::{Session, SessionBuilder}; | |
use openssl::ssl::{SslContextBuilder, SslMethod, SslVerifyMode}; | |
use std::path::PathBuf; | |
let mut context_builder = SslContextBuilder::new(SslMethod::tls())?; | |
context_builder.set_ca_file("ca.crt")?; | |
context_builder.set_verify(SslVerifyMode::PEER); | |
let session: Session = SessionBuilder::new() | |
.known_node("127.0.0.1:9142") |
This file contains 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
use scylla::{Session, SessionBuilder}; | |
let session: Session = SessionBuilder::new() | |
.known_node("127.0.0.1:9042") | |
.user("myusername", "mypassword") | |
.build() | |
.await?; |
This file contains 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/python | |
# @lint-avoid-python-3-compatibility-imports | |
# | |
# tcpqlat Trace TCP active connection latency (connect). | |
# For Linux, uses BCC, eBPF. Embedded C. | |
# | |
# USAGE: tcpqlat [-h] [-t] [-p PID] | |
# | |
# This uses dynamic tracing of kernel functions, and will need to be updated | |
# to match kernel changes. |
NewerOlder