# args_get
args_get
(argv: Pointer<Pointer<u8>>, argv_buf: Pointer<u8>) → Result<(), errno>
Read command-line argument data.
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 | |
import shutil | |
import sys | |
import json | |
if shutil.which('curl') is None: | |
print('This script requires curl') |
# 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 #-} |
import { readFile } from 'node:fs/promises' | |
import { WASI } from 'wasi' | |
import { argv, env } from 'node:process' | |
import * as path from 'node:path' | |
const wasmPath = path.resolve('/path/to/wasm/here.wasm') | |
const args = [path.basename(wasmPath), ...argv.slice(2)] | |
const wasi = new WASI({ |
// place this at src/routes/git-proxy/[...path]/+server.js | |
// modified from | |
// https://github.com/petersalomonsen/wasm-git/blob/master/examples/webserverwithgithubproxy.js | |
import https from 'node:https' | |
import { Readable } from 'node:stream' | |
import { error } from '@sveltejs/kit' | |
/** |
--- node_runtime.py.orig 2023-11-11 21:03:31 | |
+++ node_runtime.py 2023-11-11 21:03:08 | |
@@ -217,26 +217,27 @@ | |
print('[lsp_utils] START output of command: "{}"'.format(' '.join(args))) | |
print(stdout) | |
print('[lsp_utils] Command output END') | |
if error is not None: | |
raise Exception('Failed to run npm command "{}":\n{}'.format(' '.join(args), error)) | |
def npm_command(self) -> List[str]: |
import child_process from 'node:child_process' | |
function run(cmd) { | |
child_process.execSync(cmd, { stdio: 'inherit' }) | |
} | |
;(async () => { | |
let ts_patched = false | |
try { |