Skip to content

Instantly share code, notes, and snippets.

View thewh1teagle's full-sized avatar
💭
coding

thewh1teagle

💭
coding
  • localhost
  • The martian
View GitHub Profile
@thewh1teagle
thewh1teagle / main.py
Created October 23, 2024 18:44
Decrypt chrome v20 cookies with appbound protection
"""
Decrypt chrome v20 cookies with app bound protection
Tested in 2024-10-23 with Chrome version 130.0.6723.70 on Windows 11 23H2
pip install pywin32 pycryptodome pypsexec
python main.py
"""
import os
import json
import sys
@thewh1teagle
thewh1teagle / Modelfile
Created October 17, 2024 12:15
ollama Ministral ~4GB. easy to get structured format back
# Modelfile generated by "ollama show"
#
# To build a new Modelfile based on this, replace FROM with:
# FROM hf.co/bartowski/Ministral-8B-Instruct-2410-HF-GGUF-TEST:latest
FROM hf.co/bartowski/Ministral-8B-Instruct-2410-HF-GGUF-TEST:latest
PARAMETER stop [INST]
PARAMETER stop [/INST]
@thewh1teagle
thewh1teagle / Dockerfile
Last active October 9, 2024 19:03
Docker Challenge
# Server
FROM node:22-bookworm
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
EXPOSE 1337
CMD ["npm", "run", "prod"]
@thewh1teagle
thewh1teagle / main.py
Last active October 7, 2024 00:47
Data structure algorithms
# Popular sort algorithms in Python
def bubble_sort(arr: list[int]) -> list[int]:
for _ in range(len(arr)):
for j in range(len(arr) - 1):
if arr[j] > arr[j + 1]:
arr[j], arr[j + 1] = arr[j + 1], arr[j]
return arr
@thewh1teagle
thewh1teagle / yad2.js
Created September 22, 2024 12:00
Insert links in yad2
function insertLinks() {
const products = document.querySelectorAll('div[data-product-endpoint]');
for (const product of products) {
var productUrl = product.getAttribute('data-product-endpoint');
var link = document.createElement('a');
link.href = productUrl;
link.innerHTML = product.outerHTML;
link.target = '_blank';
product.parentNode.insertBefore(link, product);
product.remove();
@thewh1teagle
thewh1teagle / wget.ts
Created September 21, 2024 13:07
Wget in nodejs
import {randomBytes} from "node:crypto";
import fs from 'fs'
function randomString(length = 10) {
return randomBytes(length).toString('hex');
}
interface wgetOpts {
out_path?: string | null
import { remember } from "@epic-web/remember";
import mysql from "mysql2/promise";
import "./config";
import { Player } from "./types";
import { nomrmalizeNumber } from "./utils";
var conn: mysql.Connection;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  Action                                                                                                                                                               |  Mean duration (s)    |  Num calls            |  Total time (s)       |  Percentage %         |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  Total                                                                                                                                                                |  -                    |  14775             
[package]
name = "present"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]