Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
mattiasghodsian / README.md
Last active July 11, 2025 01:34
Inertia.js Form Helper for Axios/API calls

Inertia.js currently lacks a built-in method for making endpoint requests to retrieve data without triggering a page reload. The following solution is adapted from mohitmamoria solution implementation.

Example

const title = "";
const form = useAPIForm({
    title: '',
});
@mohitmamoria
mohitmamoria / README.md
Last active July 11, 2025 01:32
Inertia.js Form Helper for Axios/API calls

Inertia.js ships with a fantastic form helper but it falls short when also using API/Axios calls in your project.

Here's a composable, built on top of the Inertia's form helper that hooks into it to replace the API calls with Axios.

To use, just replace useForm with useAPIForm.

const form = useAPIForm({
    title: '',
});
@HIXcoffeepool
HIXcoffeepool / drep-interview-coffeepool.md
Last active July 11, 2025 01:10
DReps Interview questions by CoffeePool.jp

🎤 DRep Interview – Community Questionnaire (English / 日本語)

Thank you for participating in this community interview series!
このコミュニティインタビュー企画にご参加いただき、ありがとうございます!

We aim to introduce the thoughts and values of DReps from across the Cardano ecosystem.
このシリーズでは、Cardanoエコシステム全体におけるDRepの考え方や価値観を紹介していきます。

Responses will be shared on coffeepool.jp.
いただいた回答は、coffeepool.jp に掲載される予定です。

@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@iamnolanhu
iamnolanhu / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 18, 2025 13:39
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
@rain1024
rain1024 / tut.md
Last active July 10, 2025 23:44
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@philschmid
philschmid / GEMINI.md
Created July 8, 2025 16:09
Explain mode

Gemini CLI: Explain Mode

You are Gemini CLI, operating in a specialized Explain Mode. Your function is to serve as a virtual Senior Engineer and System Architect. Your mission is to act as an interactive guide, helping users understand complex codebases through a conversational process of discovery.

Your primary goal is to act as an intelligence and discovery tool. You deconstruct the "how" and "why" of the codebase to help engineers get up to speed quickly. You must operate in a strict, read-only intelligence-gathering capacity. Instead of creating what to do, you illuminate how things work and why they are designed that way.

Your core loop is to scope, investigate, explain, and then offer the next logical step, allowing the user to navigate the codebase's complexity with you as their guide.

Core Principles of Explain Mode

@philschmid
philschmid / GEMINI.md
Last active July 10, 2025 23:37
Gemini CLI Plan Mode prompt

Gemini CLI Plan Mode

You are Gemini CLI, an expert AI assistant operating in a special 'Plan Mode'. Your sole purpose is to research, analyze, and create detailed implementation plans. You must operate in a strict read-only capacity.

Gemini CLI's primary goal is to act like a senior engineer: understand the request, investigate the codebase and relevant resources, formulate a robust strategy, and then present a clear, step-by-step plan for approval. You are forbidden from making any modifications. You are also forbidden from implementing the plan.

Core Principles of Plan Mode

  • Strictly Read-Only: You can inspect files, navigate code repositories, evaluate project structure, search the web, and examine documentation.
  • Absolutely No Modifications: You are prohibited from performing any action that alters the state of the system. This includes:
@urschrei
urschrei / parseml.py
Last active July 10, 2025 23:30
Extract attachments from EML files in the current dir, and write them to the output subdir. Now with recursion and robust filename handling
#!/usr/bin/env python3
"""
2025 update:
- Recursive extraction from nested EML files
- Robust filename handling with sanitization and deduplication
- Proper logging instead of print statements
- Enhanced error handling and validation
- Binary file reading for better encoding support
- Cross-platform filename compatibility
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DomContentLoaded</title>
<script>
let startTime = performance.now();
</script>
<link rel="shortcut icon" href="./github.svg" />