Skip to content

Instantly share code, notes, and snippets.

@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active January 10, 2025 07:45
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@thomwolf
thomwolf / top-k-top-p.py
Last active January 10, 2025 07:45
Sample the next token from a probability distribution using top-k and/or nucleus (top-p) sampling
def top_k_top_p_filtering(logits, top_k=0, top_p=0.0, filter_value=-float('Inf')):
""" Filter a distribution of logits using top-k and/or nucleus (top-p) filtering
Args:
logits: logits distribution shape (vocabulary size)
top_k >0: keep only top k tokens with highest probability (top-k filtering).
top_p >0.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering).
Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751)
"""
assert logits.dim() == 1 # batch size 1 for now - could be updated for more but the code would be less clear
top_k = min(top_k, logits.size(-1)) # Safety check
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

@zenware
zenware / 0_resume_tips.md
Last active January 10, 2025 07:44
Information mostly gathered from [talent.works](https://web.archive.org/web/20201111191543/https://talent.works/) (now-defunct) it may be worth reading through there as these notes are essentially a summary of that content.

Resume Tips

Resumes between 475-600 words have a higher interview rate with a sharp cliff on either end. -- Try to fit it all on one page, 2 pages max.

Have enough keywords to match ~50% of the job requirements, but don't overdo it.

No Objective Section (Unless you're wanting it to take place of a cover letter)

Every 3 sentences, use at least 1 number to demonstrate concrete impact Hovering around 20% of the content having numbers

@bbbenji
bbbenji / bambu_lab-lovelace.yaml
Last active January 10, 2025 07:43
Bambu Lab X1C Lovelace Dashboard
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Bambu Lab X1C
alignment: start
- type: custom:mod-card
card:
type: custom:mushroom-chips-card
@dskvr
dskvr / bambu_lab-lovelace.yaml
Created June 7, 2024 13:53
Bambu Lab P1S Lovelace Dashboard
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Bambu Lab X1C
alignment: start
- type: custom:mod-card
card:
type: custom:mushroom-chips-card
@havenwood
havenwood / data_literal.rb
Created January 9, 2025 16:41
A `~{meaning: 42}`-style Data literal implemented in Ruby
module DataLiteral
refine Hash do
def to_data(name = nil)
if name
unless Object.const_defined?(name)
Object.const_set(name, Data.define(*keys))
end
Object.const_get(name).new(*values)
else
@DvilMuck
DvilMuck / aternosAntiAntiadblock.user.js
Last active January 10, 2025 07:41
Aternos Anti Anti Adblock userscript for Aternos.org
// ==UserScript==
// @name Aternos Anti Anti-adblock
// @namespace r0630hh1edcuum5397kimyc0ucwy2h3psn4c6r1u4j
// @version 0.1.23
// @description Fuck anti-adblock from the free hosting minecraft servers Aternos.org. Parry this you filthy casual!
// @author Angry Developer against excessive ADs
// @source https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a
// @supportURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a
// @updateURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a/raw/aternosAntiAntiadblock.user.js
// @downloadURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a/raw/aternosAntiAntiadblock.user.js
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 10, 2025 07:41
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active January 10, 2025 07:40
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under User Settings -> Gift Inventory