Skip to content

Instantly share code, notes, and snippets.

View hikarin522's full-sized avatar
🍑
ζ*'ヮ')ζ*)ㆆ_ㆆ)

hikari hikarin522

🍑
ζ*'ヮ')ζ*)ㆆ_ㆆ)
View GitHub Profile
#pragma once
#include <boost/version.hpp>
#if BOOST_VERSION >= 105900
#define ENABLE_RANKED_INDEX
#endif
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/mem_fun.hpp>
#pragma once
// C++20 bind_front
// https://cpprefjp.github.io/reference/functional/bind_front.html
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0356r5.html
#ifndef __cpp_lib_bind_front
#include <utility>
#include <functional>
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 1 column 15
---
title: RxSwift: ObservableをSequenceで同期処理に変更する
tags: Swift RxSwift
author: hikarin522
slide: false
---
class SyncFIFO<T> {
    var buf = Array<T>()
@hikarin522
hikarin522 / git_find_big.ps1
Last active October 27, 2021 14:59
git_find_big.sh の改良版 (PowerShell 7)
#!/usr/bin/env -S pwsh -nop
$blobs = Start-ThreadJob {
gci "$(git rev-parse --git-common-dir)/objects/pack/pack-*.idx" | % -Parallel {
git verify-pack -v $_ | % {
if ($_ -match '^([\da-f]+) blob +(\d+) (\d+)') {
$blob = @{
hash = $Matches[1]
file_size = [long]$Matches[2]
pack_size = [long]$Matches[3]
@hikarin522
hikarin522 / lfs-check.ps1
Last active August 7, 2020 06:39
プルリクのLFSチェック
#!/usr/bin/env -S pwsh -nop
# プルリクにLFS化してないバイナリファイルが存在するかチェックする
# 引っかかったらLFS化した後 git rebase -i で fixup して歴史から消すこと
# 文字コード問題用
# $OutputEncoding = [Text.Encoding]::UTF8
# [Console]::OutputEncoding = $OutputEncoding
# [Console]::InputEncoding = $OutputEncoding
@hikarin522
hikarin522 / task.hpp
Created October 16, 2020 11:32
c++ task
#include <condition_variable>
#include <functional>
#include <future>
#include <memory>
#include <mutex>
#include <boost/optional.hpp>
#include <boost/variant.hpp>
namespace task