Skip to content

Instantly share code, notes, and snippets.

@dinvlad
dinvlad / gist:7d2f505c56bffb9e743c2ce8f4b2a746
Created August 22, 2022 21:43
Trufflehog hangs indefinitely on scanning a Jupyter notebook
$ trufflehog git https://github.com/dinvlad/pyro-cov.git \
--branch bkotzen-CEPI --max-depth 2 \
--since-commit 9cd031577750f88648a0cee5f8d6ed781f717c6b --trace
DEBU[0000] running version dev
DEBU[0000] running version dev
DEBU[0000] running with up to 1 workers
DEBU[0000] loaded 2 decoders
DEBU[0000] loaded 694 detectors total, 694 with verification enabled. 0 with verification disabled
DEBU[0000] Cloning remote Git repo without authentication
@dinvlad
dinvlad / trace.txt
Created June 28, 2023 19:54
Trufflehog update redirect error
$ trufflehog filesystem . --debug --trace
2023/06/28 15:53:38 [updater parent] run
2023/06/28 15:53:38 [updater parent] checking for updates...
2023/06/28 15:53:39 [updater parent] failed to get latest version: Post "https://oss.trufflehog.org/updates": stopped after 10 redirects
2023/06/28 15:53:39 [updater parent] starting /usr/local/bin/trufflehog
2023/06/28 15:53:40 [updater child#1] run
2023/06/28 15:53:40 [updater child#1] start program
2023-06-28T15:53:40-04:00 info-2 trufflehog trufflehog 3.40.0
2023-06-28T15:53:40-04:00 info-2 trufflehog engine started {"workers": 16}
2023-06-28T15:53:40-04:00 info-0 trufflehog loaded decoders {"count": 3}
@dinvlad
dinvlad / cnrm.yaml
Last active November 20, 2024 09:42
Config Connector customization
apiVersion: customize.core.cnrm.cloud.google.com/v1beta1
kind: ControllerResource
metadata:
name: cnrm-controller-manager
spec:
replicas: 1
containers:
- name: manager
resources:
limits:
@dinvlad
dinvlad / grpo_demo.py
Created January 31, 2025 03:41 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@dinvlad
dinvlad / tanstack_regex.txt
Last active May 12, 2026 03:41
Regex command to search for packages possibly affected by Tanstack attack
rg '(\@beproduct\/nestjs-auth|\@dirigible-ai\/sdk|\@draftauth\/client|\@draftauth\/core|\@draftlab\/auth|\@draftlab\/auth-router|\@draftlab\/db|\@mesadev\/rest|\@mesadev\/saguaro|\@mesadev\/sdk|\@mistralai\/mistralai|\@mistralai\/mistralai-azure|\@mistralai\/mistralai-gcp|\@ml-toolkit-ts\/preprocessing|\@ml-toolkit-ts\/xgboost|\@squawk\/airport-data|\@squawk\/airports|\@squawk\/airspace|\@squawk\/airspace-data|\@squawk\/airway-data|\@squawk\/airways|\@squawk\/fix-data|\@squawk\/fixes|\@squawk\/flight-math|\@squawk\/flightplan|\@squawk\/geo|\@squawk\/icao-registry|\@squawk\/icao-registry-data|\@squawk\/mcp|\@squawk\/navaid-data|\@squawk\/navaids|\@squawk\/notams|\@squawk\/procedure-data|\@squawk\/procedures|\@squawk\/types|\@squawk\/units|\@squawk\/weather|\@supersurkhet\/cli|\@supersurkhet\/sdk|\@tallyui\/components|\@tallyui\/connector-medusa|\@tallyui\/connector-shopify|\@tallyui\/connector-vendure|\@tallyui\/connector-woocommerce|\@tallyui\/core|\@tallyui\/database|\@tallyui\/pos|\@tallyui\/storage-sqlite|