Skip to content

Instantly share code, notes, and snippets.

View 0wwafa's full-sized avatar

Robert Sinclair 0wwafa

  • Italy / UK / Egypt
View GitHub Profile
@0wwafa
0wwafa / print_grok.md
Created February 26, 2025 02:24
PRINT / EXPORT Grok to PDF

To print a GROK chat, paste this code in javascript console:

(function() {
    var a = document.querySelector("body > div > div").children[0].children[1].children[0];
    if (a) {
        const b = window.open("", "_blank", `width=${.85 * window.screen.width},height=${.85 * window.screen.height},left=${.075 * window.screen.width},top=${.045 * window.screen.height}`)
          , e = Array.from(document.styleSheets).map(c => {
            try {
                return Array.from(c.cssRules).map(d => d.cssText).join("\n")
            } catch (d) {
@0wwafa
0wwafa / PRINT_CLAUDE.md
Last active April 8, 2025 18:23
Print / Export Claude Chat

Go to https://claude.ai/chat/new (or any other chat you had in the past).

Then run this code:

function printClaude() {   // (C) 2024 by ZeroWw. If you use this code, just give me some credit.

    const centralPart = document.getElementsByClassName('mb-1 mt-1')[1].parentElement.parentElement.parentElement.parentElement;

    if (centralPart) {
        // Create a new window for printing
@assafmo
assafmo / 1_curl_tor.sh
Last active April 16, 2025 20:39
Use curl with TOR as proxy
#!/bin/bash
# Install
sudo apt install -y tor
# Use
curl --proxy socks5h://localhost:9050 https://check.torproject.org
@alexradzin
alexradzin / selftar.sh
Last active March 6, 2025 18:54
Script that creates self extracting executable script from tar.gz file.
#!/bin/sh
if [ $# -eq 0 ]; then
echo "This script creates self extractable executable"
echo Usage: $0 TAR.GZ [COMMAND]
exit;
fi
if [ $# -gt 0 ]; then
TAR_FILE=$1