Do It by Code
54 subscribers
713 photos
99 videos
15 files
1.24K links
We uhhhhh... do things by coding them.
Download Telegram
Should I blame caching

https://shouldiblamecaching.com/
CVE-2025-21333 (score: 7.8, high)
Windows Hyper-V Zero-Day
POC Repository

heap-based buffer overflow. It leverages WNF state data and I/O ring IOP_MC_BUFFER_ENTRY
The vulnerability was detected as being actively exploited by threat actors. Tested on Windows 11 23h2.

Overwriting I/O Ring buffer entry to get arbitrary read/write
It allocates in the Paged Pool an array of pointers to _IOP_MC_BUFFER_ENTRY and overwrites the first pointer with a malicious IOP_MC_BUFFER_ENTRY* located in user-space. Using BuildIoRingWriteFile()/BuildIoRingReadFile() It is possible to obtain arbitrary read/write in the kernel.

The array of pointers to _IOP_MC_BUFFER_ENTRY is an object with PoolTag IrRB.


#vulnerability #cve
"An atomic load is ~5x faster than a mutex, which can matter in tight loops."

1. Mutex Operations: A mutex involves several expensive operations:
- System calls to the kernel
- Potential context switches
- Lock contention handling
- Thread scheduling overhead

2. Atomic Operations:
- Execute directly on the CPU using special hardware instructions
- Don't require kernel intervention
- No context switching
- No thread scheduling overhead

The ~5x performance difference comes from eliminating all the mutex-related overhead. However, it's important to note that atomic operations aren't always the best solution - they're ideal for simple operations like this error check, but mutexes are still necessary for more complex critical sections where you need to protect multiple operations.


- Commit
👍1
Urban Dead is shutting down
Article, Comments
Show HN: Fork of Claude-code working with local and other LLM providers
Article, Comments
https://www.perplexity.ai/page/openai-s-20000-ai-agent-nvz8rzw7TZ.ECGL9usO2YQ

Low-end agents priced at $2,000 per month, targeting high-income knowledge workers

Mid-tier agents around $10,000 per month, designed for software development tasks

High-end agents up to $20,000 per month, functioning as PhD-level research assistants

imagine paying openai this much instead of just paying for an expert...
MathArena
Evaluating LLMs on Uncontaminated Math Competitions

https://matharena.ai/
GitHub repository
#llm #math
How to Calculate a Rotation Matrix to Align Vector A to Vector B in 3D
(Based on 'Avoiding Trigonometry' by Íñigo Quílez)
https://gist.github.com/kevinmoran/b45980723e53edeb8a5a43c49f134724
I wish this had support for d and y (day and year)

would have made things so much easier
what is the differences between these two commands?

git push --force-with-lease
git push --force

Gemini's response:
The key difference between git push --force and git push --force-with-lease lies in their safety mechanisms, particularly when working in a collaborative environment. Here's a breakdown:

git push --force:

Unconditional Overwrite:
This command forcefully overwrites the remote branch with your local branch, regardless of the remote branch's current state.
This means that if someone else has pushed changes to the remote branch since your last fetch, those changes will be lost.

Risk of Data Loss:
Due to its unconditional nature, git push --force is considered risky and should be used with caution. It can lead to accidental data loss, especially in collaborative projects.

Use Cases:
While generally discouraged, it might be used in situations where you are absolutely certain that you need to completely replace the remote branch's history, such as when cleaning up a personal feature branch.


git push --force-with-lease:

Safer Overwrite:
This command provides a safer alternative to git push --force. It checks if the remote branch's state matches your local repository's expectation before overwriting it.
Specifically, it verifies that the remote branch has not changed since your last fetch.
If the remote branch has been updated by someone else, the push will be rejected, preventing accidental overwrites.

Preventing Accidental Overwrites:
git push --force-with-lease helps prevent you from unintentionally overwriting other people's work.

Use Cases:
It's recommended for situations where you need to force push after rebasing or rewriting history, especially in collaborative environments.
In essence:

--force is a blunt instrument that can cause significant damage.
--force-with-lease is a more refined tool that adds a safety net.
Therefore, git push --force-with-lease is generally the preferred option when you need to force push, as it minimizes the risk of data loss.


#git #force_push
how to change your commits' old email if you have lost access to that old email?

git filter-repo --email-callback '
if email == b"old_email@example.com":
return b"new_email@example.com"
else:
return email
'

(if you are on windows, consider using "git bash")

if you have signed your commits, then your signatures will become invalidated after running this command.

To re-sign your commits, you have multiple ways:
1. If you are a normal person and care about your commit dates:
git rebase --exec 'CURRENT_COMMIT=$(git rev-parse HEAD); GIT_AUTHOR_DATE_ISO=$(git show -s --format=%aI "$CURRENT_COMMIT"); export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE_ISO"; git commit --amend --no-edit -S --date="$GIT_AUTHOR_DATE_ISO"; unset GIT_COMMITTER_DATE GIT_AUTHOR_DATE_ISO CURRENT_COMMIT;' --root


2. If you DO NOT CARE about your commit dates being set to TODAY (this will cause significant grief and suffering for you, because your commit dates will all be set to NOW; you will lose your real commits dates):
git rebase --exec 'git commit --amend --no-edit -S' --root


(thanks to Gemini 2.0 Flash for providing code and emotional support)

#git #git_email