Skip to content

Instantly share code, notes, and snippets.

Code Bash command prefix detection

This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.

Command prefix extraction examples

Examples:

  • cat foo.txt => cat
  • cd src => cd
@tarruda
tarruda / deploy.js
Created January 3, 2022 13:04 — forked from tuncatunc/deploy.js
Hardhat deploy script to deploy UniswapV2Factory, and create token pairs.
// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
//
// When running the script with `hardhat run <script>` you'll find the Hardhat
// Runtime Environment's members available in the global scope.
const hre = require("hardhat");
async function main() {
// Hardhat always runs the compile task when running scripts with its command
// line interface.
@tarruda
tarruda / pkg-gonfig.go
Created November 29, 2015 21:48 — forked from mattn/pkg-gonfig.go
go implementation of pkg-config
package main
import (
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
)