Skip to content

Instantly share code, notes, and snippets.

View yokofly's full-sized avatar
🎾

haohang yokofly

🎾
View GitHub Profile
@yohhoy
yohhoy / delayqueue.cpp
Last active July 29, 2023 14:59
C++ delay queue - unbound blocking queue with delay of element deque (like Java's java.util.concurrent.DelayQueue)
// delayqueue.cpp -- C++ delay queue
// Copyright (c) 2018 yohhoy
//
// Boost Software License, Version 1.0
// https://www.boost.org/LICENSE_1_0.txt
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <utility>
#include <vector>
@mstorsjo
mstorsjo / combine_static_libraries.sh
Last active April 3, 2023 07:50 — forked from evands/combine_static_libraries.sh
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, x86_64, armv7, armv7s and arm64 architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software