Skip to content

Instantly share code, notes, and snippets.

View lynsei's full-sized avatar
:octocat:
Huzzah!

Lynsei lynsei

:octocat:
Huzzah!
View GitHub Profile
@lynsei
lynsei / Find.bash
Last active March 14, 2025 20:01
[deno gist cleanup] / Gist search tool for deleting and searching through gists.
# find multiple
deno run --allow-net --allow-env github-gist-manager.ts -t "foo" -t "bar"
# regex
deno run --allow-net --allow-env github-gist-manager.ts -r "foo.*bar"
# combined terms + regex
@lynsei
lynsei / gh-gist-delete.js
Created March 14, 2025 14:55
node-gist-search.js
var async = require('async');
var GitHubApi = require('github');
var github = new GitHubApi({
version: '3.0.0',
protocol: 'https'
});
github.authenticate({
@lynsei
lynsei / Func.fish
Last active March 7, 2025 17:51
Nushell get usage
function get_ci_usage
set org "your-org-name" # Replace with your GitHub Organization Name
echo "Fetching workflow run counts for all repositories in $org..."
set query '
{
organization(login: "'$org'") {
repositories(first: 100) {
nodes {
@lynsei
lynsei / jfrog-cloud-top-network-stats.md
Created March 6, 2025 14:58
[jfrog cloud] #artifactory #jfrog-cloud

JFrog Cloud API Calls for Storage, Downloads, and Throughput Analysis

1. Get Storage Information (Find the Largest Artifacts)

Retrieve total storage usage and identify largest artifacts.

A. Get Overall Storage Usage

curl -u "username:password" -X GET "https://site.jfrog.io/artifactory/api/storageinfo"
@lynsei
lynsei / commands.md
Created March 5, 2025 20:57
[monorepos] #monorepo #commands

MonoRepo

Git commands for working with Monorepos:

Ensure the following:

git config --global core.symlinks true
git clone --recurse-submodules https://github.com/$repo.git /deno
@lynsei
lynsei / jfrog.md
Created March 5, 2025 14:24
[jfrog] Data Usage Info [clickhouse + jfrog]

JFrog Data Overuse Analysis

1. Audit JFrog Usage

1.1 Check JFrog Storage and Transfer Reports

  • Navigate to JFrog Platform UIAdministrationStorage or Transfer sections.
  • Identify which repositories and artifacts consumed the most bandwidth.

1.2 Enable JFrog Logs & Insights

  • If not enabled, activate JFrog Insight to get usage statistics on frequently pulled artifacts.
  • Use JFrog Access Logs to track downloads.
@lynsei
lynsei / Makefile
Last active March 3, 2025 22:48
[Makefile Self-Documenting] #autodoc #makefile
# import config
ifeq ($(shell test -e .env),yes)
cnf ?= .env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
endif
# HIDDEN
print-%: ## Print env var names and values
@lynsei
lynsei / crypto-kp.ts
Created February 26, 2025 20:50
[deno-keepass]
import { encode as btoa, decode as atob } from "https://deno.land/[email protected]/encoding/base64.ts";
import kdbxweb from "npm:kdbxweb";
// KeePass Configuration
const KEEPASS_DB_PATH = "/path/to/your/database.kdbx";
const KEEPASS_MASTER_PASSWORD = "your-master-password"; // Secure this in an env variable
const TARGET_ENTRY_TITLE = "AES-GCM Key";
const TARGET_ENTRY_URL = "keepass://AES-Key";
// Read the KeePass database
@lynsei
lynsei / .github-actions-deno-action.yml
Created February 24, 2025 20:49
#Deno in #GithubActions
name: "Deno Action"
description: "A GitHub Action using Deno"
inputs:
name:
description: "Name to greet"
required: true
runs:
using: "composite"
steps:
- run: deno run --allow-env --allow-net https://deno.land/std/examples/welcome.ts
@lynsei
lynsei / Dockerfile
Created February 24, 2025 20:16
[python3] the #best #pyenv #image for #python3
# syntax=docker/dockerfile:1.3
FROM --platform=$BUILDPLATFORM bitnami/python:latest
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "Platform: $BUILDPLATFORM"
RUN echo "Target: $TARGETPLATFORM"
ENV PYENV_ROOT=/root/.pyenv
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH:/usr/local/bin"
RUN apt-get update && apt-get -o "Acquire::https::Verify-Peer=false" install -y curl ca-certificates git bash pipenv pipx
COPY ./trusted_certs.pem /usr/share/ca-certificates/trusted_certs.crt