Skip to content

Instantly share code, notes, and snippets.

@whizkydee
whizkydee / useEffectWithChangeLogger.ts
Created March 13, 2025 11:17
Drop-in replacement for `useEffect` that helps debug unstable dependencies
const useEffectWithChangeLogger = (
effect: () => void,
deps: any[],
name = 'Component',
) => {
const previousDepsRef = useRef<any[] | null>(null);
useEffect(() => {
if (previousDepsRef.current) {
const changedDeps = deps
@MangaD
MangaD / cpp_algorithms_functors.md
Last active March 13, 2025 11:18
Comprehensive List of STL Algorithms & Functors

🔹 Comprehensive List of STL Algorithms

CC0

Disclaimer: Grok generated document.

The STL contains a wide range of algorithms, mostly defined in the <algorithm> header, with additional ones in <numeric> and other headers. Below is a comprehensive list of the algorithms available in the C++ STL as of the latest standards (up to C++20, with some C++23 additions where applicable). I'll categorize them for clarity, based on their primary functionality:


76561198193885310
@chrishow
chrishow / debounce.ts
Created March 13, 2025 11:16
Tiny debounce in Typescript
// Tiny debounce
interface DebounceFunction {
(callback: (...args: any[]) => void, frequency?: number, timer?: number | null): (...args: any[]) => void;
}
export const debounce: DebounceFunction = (callback, frequency = 250, timer: number | null = null) => {
return (...args: any[]) => (
clearTimeout(timer!), (timer = setTimeout(function () {
callback();
}, frequency, ...args))
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:amll="http://www.example.com/ns/amll" xmlns:itunes="http://music.apple.com/lyric-ttml-internal"><head><metadata><ttm:agent type="person" xml:id="v1"/><amll:meta key="musicName" value="Warmth of the eternity"/><amll:meta key="musicName" value="Warmth of the eternity (Single Version)"/><amll:meta key="musicName" value="Warmth of the eternity (Instrumental)"/><amll:meta key="artists" value="塚本のべる"/><amll:meta key="artists" value="Spirit Garden"/><amll:meta key="artists" value="笠井雄太(Elements Garden)"/><amll:meta key="album" value="セレクトオブリージュ ボーカルアルバム"/><amll:meta key="ncmMusicId" value="2616562213"/><amll:meta key="ncmMusicId" value="2616558689"/><amll:meta key="qqMusicId" value="004NbjMG2roL0H"/><amll:meta key="qqMusicId" value="0000gLau4RIkrm"/><amll:meta key="ttmlAuthorGithub" value="141757610"/><amll:meta key="ttmlAuthorGithubLogin" value="smzase"/></metadata></head><body dur="04:59.000"><div begin="00:23.120" end="04:5
@boegelbot
boegelbot / easybuild_test_report_22521_easybuilders_preasybuild-easyconfigs_20251513-UTC-11-15-58.md
Created March 13, 2025 11:15
EasyBuild test report for easybuilders/easybuild-easyconfigs PR(s) #22521
@boegelbot
boegelbot / XML-LibXML-2.0207-GCCcore-10.3.0_partial.log
Created March 13, 2025 11:15
(partial) EasyBuild log for failed build of /tmp/eb-cq6de2bs/files_pr22521/x/XML-LibXML/XML-LibXML-2.0207-GCCcore-10.3.0.eb (PR(s) #22521)
== 2025-03-13 11:03:35,839 filetools.py:2001 INFO Creating directory /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper (parents: True, set_gid: True, sticky: False)
== 2025-03-13 11:03:35,839 filetools.py:1853 INFO Adjusting permissions recursively for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper
== 2025-03-13 11:03:35,839 filetools.py:1883 DEBUG Current permissions for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper: 0o42755
== 2025-03-13 11:03:35,839 filetools.py:1888 DEBUG Adding permissions for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper: 0o2000
== 2025-03-13 11:03:35,839 filetools.py:1901 DEBUG Current permissions for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper are already OK: 0o42755
== 2025-03-13 11:03:35,839 filetools.py:1853 INFO Adjusting permissions recursively for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapper/g++
== 2025-03-13 11:03:35,839 filetools.py:1883 DEBUG Current permissions for /tmp/eb-cq6de2bs/tmpcavzea61/rpath_wrappers/gxx_wrapp
// ==UserScript==
// @name type-ahead-find
// @version 1
// @author Arnau Sanchez <tokland@gmail.com> (2009)
// @match <all_urls>
// @run-at document-start
// ==/UserScript==
@nuttxpr
nuttxpr / ci-arm-07.log
Created March 13, 2025 11:14
[arm-07] CI Log for nuttx @ e0b02314e6e28b10ee84837bfe62b1e48700f85a / nuttx-apps @ 3b03636e95f6202b512d8af32629da4c0dc4af2c
Script started on 2025-03-13 18:03:58+08:00 [COMMAND="/home/luppy/nuttx-release/run-job.sh arm-07 1" TERM="tmux-256color" TTY="/dev/pts/6" COLUMNS="100" LINES="10"]
Now running https://github.com/lupyuen/nuttx-release/blob/main/run-job.sh arm-07 1
Called by https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh
+ job=arm-07
+ [[ arm-07 == '' ]]
+ instance=1
+ set
+ grep TMUX
+ true
+ neofetch
@jarno-vos
jarno-vos / force-ssl-enabled.php
Created March 13, 2025 11:14
force-ssl-enabled.php
<?php
defined('ABSPATH') or die();
add_action('plugins_loaded', 'force_rsssl_ssl_option');
function force_rsssl_ssl_option() {
if (function_exists('rsssl_update_option')) {
rsssl_update_option('ssl_enabled', true);
}
}