这是indexloc提供的服务,不要输入任何密码
Skip to content

Instantly share code, notes, and snippets.

@SagarPuneria
SagarPuneria / Go_advance_concpets.md
Last active July 26, 2025 14:43
Golang and SQL technical discussion
@jinjier
jinjier / javdb-top250.md
Last active July 26, 2025 14:17
JavDB top 250 movies list. [Updated on 2025/07]
@corsix
corsix / sneaky.lua
Last active July 26, 2025 14:15
Exploiting Lua 5.2 on x64
-- double as_num(GCobj* x) { return reinterpret_cast<double>(x); }
local as_num = string.dump(function(...) for n = ..., ..., 0 do return n end end)
as_num = as_num:gsub("\x21", "\x17", 1) -- OP_FORPREP -> OP_JMP
as_num = assert(load(as_num))
-- uint64_t addr_of(GCobj* x) { return reinterpret_cast<uint64_t>(x); }
local function addr_of(x) return as_num(x) * 2^1000 * 2^74 end
-- std::string ub8(uint64_t n) { return std::string(reinterpret_cast<char*>(&n), 8); }
local function ub8(n)
@JV-conseil
JV-conseil / Radio-France-Flux-HD-AAC.md
Last active July 26, 2025 14:11
Les nouveaux flux web audio Hifi HD au format .aac des stations de Radio France 📻
@ordian
ordian / README.md
Last active July 26, 2025 13:54
HOWTO: heap profiling with jemallocator
  1. Make sure your rust application uses https://github.com/gnzlbg/jemallocator as the global memory allocator (when in doubt, grep jemallocator in your Cargo.lock).
  2. Install jemalloc (we'll only need jeprof), dot, ps2pdf and libunwind on your system. Enable jemallocator's profiling feature (if jemallocator is an indirect dependency, one trick to do is to add a dependency jemallocator = { version = "*", features = ["profiling"] } to your app and let cargo select the || of features for you).
  3. export _RJEM_MALLOC_CONF=prof:true,lg_prof_interval:32,lg_prof_sample:19. lg_prof_interval sets how often profile dump should be written to disk measured in allocated bytes. The value is passed as a power of two, which is 2^32 in our case, i.e. every 4 GiB of allocations of long-lived objects (see https://github.com/jemalloc/jemalloc/wiki/Use-Case%3A-Heap-Profiling). lg_prof_sample:19 tells jemalloc to take a profiling sample every 2^19 = 512 KiB.
  4. Running your binary should produce a bun
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active July 26, 2025 13:49
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 Discover -> Quests
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active July 26, 2025 13:40
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@febef
febef / Install pulseaudio-equalizer in Debian.
Last active July 26, 2025 13:40
Instalar un ecualizador para el servidor pulseaudio en Debian.
1.
apt-get install swh-plugins ladspa-sdk
2.
# wget ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/pulseaudio-equalizer/pulseaudio-equalizer_2.7.0.2-3~webupd8~trusty1_all.deb
wget http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/pulseaudio-equalizer/pulseaudio-equalizer_2.7.0.2-2~webupd8~oneiric3_all.deb
3.
# dpkg -i pulseaudio-equalizer_2.7.0.2-3~webupd8~trusty1_all.deb
dpkg -i pulseaudio-equalizer_2.7.0.2-2~webupd8~oneiric3_all.deb
Act as an expert Prompt Engineer. Your primary reference for this task is the provided book: 'Prompt Engineering' by Lee Boonstra.
When I give you a prompt that I want to improve, which we'll call [User_Prompt_To_Improve], your objective is to analyze it and then transform it into an optimized version. This optimized version should be designed to take the biggest advantage of Gemini, based strictly on the principles, techniques, and best practices detailed in this book.
Your response should provide two key components:
The Optimized Prompt: Present the rewritten, improved version of [User_Prompt_To_Improve].