# args_get
args_get
(argv: Pointer<Pointer<u8>>, argv_buf: Pointer<u8>) → Result<(), errno>
Read command-line argument data.
/** Given chunks as iov, truncate the prompt if possible. | |
* @param {string[]} chunks | |
* @param {string} prompt | |
*/ | |
function truncatePrompt(chunks, prompt) { | |
/** Does the iov start with the given prefix? Return the end position [x, y] if yes, null if no. | |
* @param {string[]} chunks | |
* @param {string} target | |
*/ | |
function chunksStartWithPrefix(chunks, target) { |
function byCallbacks(s0, inp) { | |
if (inp == null) { | |
let s = s0 | |
if (s0.integerPart === '') { | |
s = { ...s0, integerPart: '0' } | |
} | |
return s.integerPart + (s.decimalPart ? `.${s.decimalPart}` : '') | |
} if (s0.readingIntegerPart) { | |
if (inp === '.') { |
use std::task::{Poll, Context, ready}; | |
use std::future::Future; | |
use std::pin::Pin; | |
use tokio::io::{Error, Interest, unix::AsyncFd}; | |
use tokio::time::{sleep, Duration}; | |
struct PollTarget { | |
inner: AsyncFd<i32>, | |
} |
diff --git a/Agda.cabal b/Agda.cabal | |
index b7cdd278f..03f621795 100644 | |
--- a/Agda.cabal | |
+++ b/Agda.cabal | |
@@ -1,7 +1,7 @@ | |
cabal-version: 2.4 | |
name: Agda | |
version: 2.6.4.3 | |
-build-type: Custom | |
+build-type: Simple |
import * as crypto from 'node:crypto' | |
import { loadProtobufs } from './pbs.js' | |
const pbroot = await loadProtobufs() | |
const Data = pbroot.lookupType('meshtastic.Data') | |
// Usage: decryptPacket( | |
// Buffer.from('1PG7OiApB1nwvP+rz05pAQ==', 'base64'), | |
// {from, id, encrypted}) |
// ==UserScript== | |
// @name Plurk detect hide_plurks_before | |
// @namespace me.qbane | |
// @version 1 | |
// @match https://*.plurk.com/* | |
// @run-at document-idle | |
// ==/UserScript== | |
const PGUSER = unsafeWindow.GLOBAL?.page_user?.hide_plurks_before |
import os | |
import subprocess | |
import shlex | |
from shlex import quote | |
from shutil import which | |
import sys | |
import json | |
from collections import namedtuple | |
from functools import partial |
# mkdir -p is your good friend | |
cp rg ~/.local/bin | |
cp doc/rg.1 ~/.local/share/man/man1 | |
cp complete/rg.bash ~/.local/share/bash-completion |
args_get
(argv: Pointer<Pointer<u8>>, argv_buf: Pointer<u8>) → Result<(), errno>
Read command-line argument data.
------------------------------------------------------------------------ | |
-- The Agda standard library | |
-- | |
-- All library modules, along with short descriptions | |
------------------------------------------------------------------------ | |
-- Note that core modules are not included. | |
{-# OPTIONS --rewriting --guardedness --sized-types #-} |