Skip to content

Instantly share code, notes, and snippets.

@cubu
cubu / memory.md
Created October 26, 2025 00:19 — forked from ruvnet/memory.md
Claude Memory Template

Claude Memory Template

Copy-Paste Instructions for Optimal AI Interaction

1. Core Identity and Objective

I am [Your Name/Role], focused on:

@cubu
cubu / bulk_img_convert_and_rename.py
Created September 22, 2025 00:41 — forked from ph33nx/bulk_img_convert_and_rename.py
Lightning‑fast Python CLI Script to bulk convert any image format (PNG, JPEG, WebP, BMP, TIFF, GIF…) into compressed, progressive JPEGs, bulk renamed, with all metadata stripped and every CPU core engaged. Ideal for web performance, SEO, e‑commerce product galleries, and batch uploads.
#!/usr/bin/env python3
"""
bulk_img_convert_and_rename.pyBulk Image Convert & Rename Python Script
Productionready commandline utility for web developers, photographers, SEO specialists and ecommerce teams who need to bulk convert and bulk rename thousands of images before pushing to GitHub, S3, CDN or serving them on highperformance websites.
Core features:
- Bulk image convert: reads every format Pillow supports (PNG, JPEG, WebP, BMP, TIFF, GIF, etc.) and compresses them into small, progressive JPEGs optimised for web delivery.
- Automatic bulk rename: each output is saved as img_<n>.jpg, ready for CDN caching and staticsite generators.
- Oneclick metadata stripping: removes EXIF, GPS, ICC and all other heavy data to protect privacy and improve SEO scores.
@cubu
cubu / Exploitation.md
Created September 22, 2025 00:41 — forked from yezz123/Exploitation.md
Pentesting-Exploitation
@cubu
cubu / batch_image_converter.py
Created September 22, 2025 00:35 — forked from ph33nx/batch_image_converter.py
Batch Convert Images to Web-Optimized JPG or WEBP using Python with EXIF Preservation 🖼️✨ Fast, batch image conversion while preserving EXIF metadata using Python Script
#!/usr/bin/env python3
"""
Author: ph33nx
URL: https://gist.github.com/ph33nx/861d9ff35721d56205c834c7f8308e0b
Description:
This script converts images from various formats (e.g., PNG, JPG, WebP) to either JPG or WebP for web optimization.
It preserves EXIF metadata, allows for optional parameter customization, and handles errors gracefully.

This can be used to backup any directory on your computer (not just Anki). Just take care of the size of the directory you are backing up (in case it is too big you may run out of space).

Requirements:

  1. MacOS, Windows or Linux with Unix environment tools
    1. bash
    2. zip
    3. rm
    4. cmp
    5. mkdir
  2. tail
@cubu
cubu / gpt-prompts.csv
Created January 23, 2025 02:09 — forked from jolars/gpt-prompts.csv
ChatGPT prompts
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
"act","prompt"
"Anki Card Maker","I want you to act as a flashcard creator, creating flashcards with a back side and a front side based on text that I provide. Use the SuperMemo principles for creating flashcards. Create questions that have clear and unambiguous answers and must be self-contained. The following is an example piece of text: ""The characteristics of the Dead Sea: Salt lake located on the border between Israel and Jordan. Its shoreline is the lowest point on the Earth's surface, averaging 396 m below sea level. It is 74 km long. It is seven times as salty (30% by volume) as the ocean. Its density keeps swimmers afloat. Only simple organisms can live in its saline waters."" Here are some good examples of flashcards for this text: Q: Where is the Dead Sea located?
A: on the border between Israel and Jordan., Q: What is the lowest point on the Earth's surface?
A: The Dead Sea shoreline, Q: What is the average level on which the Dead Sea is located?
A: 400 meters (below sea level), Q: How long is th
@cubu
cubu / NodeServer.md
Last active December 11, 2024 02:30
To make Figma Google Sheet Sync work with localhost folder, we need 1. Ngrok for https and 2. Serving the file allow to download rather than preview.

To create direct download links for files hosted on your local http-server, ensuring that clicking the link immediately starts the download rather than previewing the file: using a Different Server for Advanced Needs

If you require more advanced header configurations (like pattern matching), consider using a more feature-rich server such as Express.js with custom middleware.

Example with Express.js:

  1. Install Express:

    npm install express
@cubu
cubu / notes.py
Created May 6, 2024 15:36 — forked from IdanBanani/notes.py
some notes i've found
# -*- coding: utf-8 -*-
# To list this file sections: $ grep '^"" ' notes.py
"""""""""""""
"" Why Python ?
"""""""""""""
- extremely readable (cf. zen of Python + [this 2013 study](http://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/))
- simple & fast to write
- very popular (taught in many universities)
- has an extremely active development community
@cubu
cubu / useful-list-for-start-up.md
Created March 24, 2023 03:16 — forked from zmzlois/useful-list-for-start-up.md
Useful-List-For-StartUp

Product&Development

Backend