A comprehensive guide covering advanced Go programming concepts with practical examples, channel operations, concurrency patterns, and common programming scenarios.
Discover gists
使用JAV金鸡儿奖官网附带的工具JAV SQL 查询器,可查询各种类别的JavDB TOP250影片:
及分年数据(存在部分重复影片,原始数据的问题):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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) |
- Make sure your rust application uses https://github.com/gnzlbg/jemallocator as the global memory allocator (when in doubt, grep
jemallocator
in yourCargo.lock
). - Install
jemalloc
(we'll only needjeprof
),dot
,ps2pdf
andlibunwind
on your system. Enable jemallocator'sprofiling
feature (ifjemallocator
is an indirect dependency, one trick to do is to add a dependencyjemallocator = { version = "*", features = ["profiling"] }
to your app and let cargo select the||
of features for you). 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.- Running your binary should produce a bun
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.
- Generate a ssh key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]. |