Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
URL="https://www.dhl.de/int-verfolgen/data/search?piececode=${1}&noRedirect=true&language=de&cid=pulltorefresh"
RES=`curl $URL -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0' -H 'Accept: application/json' -H 'Accept-Encoding: gzip, deflate, br'`
echo $RES | jq '.sendungen[].sendungsdetails.sendungsverlauf.events'
@HookedBehemoth
HookedBehemoth / m3u8 files to m4a.c
Created October 3, 2023 23:15
libavformat/libavcodec mux multiple audio files into one without reencoding
/**
* Sample code to mux multiple audio files together into one.
* This is assuming, all of them have the same channel configuration.
* Bonus:
* - Thumbnail
* - Chapters
* - Metadata
* - without any proper error handling
* - without handling incompatible thumbnail codecs
*
@HookedBehemoth
HookedBehemoth / english.hpp
Created July 16, 2023 20:52
constexpr translations
{"playlist", "Playlist"},
{"music_browser", "Music browser"},
{"close", "Close sys-tune"}
#include "qquick_masonry.h"
MasonryLayout::MasonryLayout() : QQuickItem() {
connect(this, &QQuickItem::widthChanged, this, &MasonryLayout::handleWidthChanged);
}
void MasonryLayout::setSpacing(int32_t spacing) {
if (m_spacing == spacing) {
return;
}
@HookedBehemoth
HookedBehemoth / no_ads.diff
Last active April 10, 2023 22:05
Telegram patch to hide aliexpress ads
diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp
index 5b965667b..6fd2e6eb4 100644
--- a/Telegram/SourceFiles/history/history.cpp
+++ b/Telegram/SourceFiles/history/history.cpp
@@ -435,6 +435,9 @@ std::vector<not_null<HistoryItem*>> History::createItems(
const auto detachExistingItem = true;
for (auto i = data.cend(), e = data.cbegin(); i != e;) {
const auto &data = *--i;
+ if (data.type() == mtpc_message &&
+ qs(data.c_message().vmessage()).contains("https://s.click.aliexpress.com/"))
@HookedBehemoth
HookedBehemoth / avx2.patch
Created September 22, 2022 12:09
scanmem avx2 accelerated initial search patch
diff --git a/ptrace.c b/ptrace.c
index 5e71d78..7fd3545 100644
--- a/ptrace.c
+++ b/ptrace.c
@@ -46,6 +46,8 @@
#include <stdbool.h>
#include <limits.h>
#include <fcntl.h>
+#include <immintrin.h>
+#include <avx2intrin.h>
/**
* @file service.h
* @brief Service wrapper object
* @author fincs
* @author SciresM
* @copyright libnx Authors
*/
#pragma once
#include <switch/sf/service.h>
diff -Naur 11.0.0.400/romfs/0.txt 11.0.1.1000/romfs/0.txt
--- 11.0.0.400/romfs/0.txt 2020-12-16 22:04:41.154954800 +0000
+++ 11.0.1.1000/romfs/0.txt 2021-03-09 00:39:49.005725800 +0000
@@ -1,4 +1,37 @@
-��.*disney\.ne\.jp.*
+��^0�0�0�.*
+^0�0�0�.*
+.*0�0�0�$
+.*0�0�0�$
+.*0�00�.*
#pragma once
#include <iterator>
#include <utility>
template <typename Base>
class Enumerate {
private:
Base &base;
#pragma once
#include <array>
#include <cstdint>
enum class order {
Ascending, Descending
};
template <typename DataType, size_t MaxSize, order Order = order::Descending>
class CircularBuffer {