Skip to content

Instantly share code, notes, and snippets.

@player131007
player131007 / fix-tests-nixos.patch
Last active May 12, 2025 05:21
minimal ntpsec file for nixpkgs
diff --git a/tests/libntp/decodenetnum.c b/tests/libntp/decodenetnum.c
index a681e4f73..0f1257241 100644
--- a/tests/libntp/decodenetnum.c
+++ b/tests/libntp/decodenetnum.c
@@ -17,6 +17,7 @@ TEST_TEAR_DOWN(decodenetnum) {}
TEST(decodenetnum, Services) {
+ TEST_IGNORE_MESSAGE("/etc/services doesn't exist in the build sandbox, resolving for \"ntp\" will fail");
struct addrinfo *res;
@player131007
player131007 / tai-file-bi-chan-download-tu-google-drive.js
Last active May 2, 2024 14:54 — forked from hauvuhd/tai-file-bi-chan-download-tu-google-drive
Tải file PDF bị chặn download từ Google Drive
function getpdf() {
let jspdf = document.createElement("script");
jspdf.onload = function () {
let pdf = new jsPDF();
let elements = document.getElementsByTagName("img");
for (let i in elements) {
let img = elements[i];
if(!img.src.startsWith("blob:")) continue;
@player131007
player131007 / debug.hpp
Created March 14, 2023 16:05
Make your debug printing life easier
#ifndef debug_macro
#define debug_macro
#if __cplusplus < 201402L
#error "debug header requires C++14 and above"
#endif
#include <iosfwd>
#include <utility>
#include <type_traits>