Skip to content

Instantly share code, notes, and snippets.

View yubikey.pub
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF675jEBEAD6ojR/J+vN5g+HABXIZm64m4nMOcliG7D/JXXs7pNKGTOSTDHi
rBXYRbEcjAW27krsoVkVLa+lnU8MgtFMOQSO+YtAvWfM6HvUEbRlCa/bAtmRT1wL
TZIHhAZsQPgaDKn5T7esWNd4p6FzOy/cKd4IaN4AbKsHhoOyg4Ze93nYU6XeoPWz
oTw3IsIBY1KBE56AmICONBPs22eeKa1C5sScOa2kCy+NwRUhAba2pG/DXVr3ZDbz
ts5H5JPxtFn/+pQjpeFQEP0/sfm6SmIcep1UG+dv8cyPGUSrJWq1NAvJ2es8Gfvm
8hmvJLLSzbTlCCHzp6wlkNdoI/maEJIYPr8kfjUcc18NsnC9NBBgFAE9tsAMCcu9
zxsmrxF9vlHi/lf3cA3oldtAweXH3Ic+jgXH9riLvvsAUXGtEwZh3OOHoEV2WgSn
wrDnaLtMObfBc74HkWPfGSCghG5LoJnpGuB0Yb5Is9QKfb+XbiGDL3nhk3kzo1gR
View result.hpp
#ifndef INCLUDE_GUARD_AB644267_F64D_4246_AF44_EA40B259E804
#define INCLUDE_GUARD_AB644267_F64D_4246_AF44_EA40B259E804
#include <functional>
#include <utility>
#include <variant>
namespace hatsusato {
namespace detail {
namespace tag {
View kmc-advent-2018.org
@hatsusato
hatsusato / is_prime.cpp
Last active Apr 22, 2018
constexpr is_prime using Miller test
View is_prime.cpp
#include <cstdint>
using u64 = std::uint64_t;
// a + b
constexpr u64 mod_add(u64 a, u64 b, u64 m) {
if (~a < b) {
return (a + b) % m + ~m + 1;
} else {
return a + b;
View kmc-advent-2017.md

gpg のはなし

この記事は [KMC Advent Calendar 2017][advent] の 10 日目の記事です。 昨日の記事は tron 君 ([id:tron_kmc][tron-id]) の[今年の活動を振り返る - tron-Factory 業務日誌][tron]でした。 はたち🎉めでたい㊗️

はじめに

KMC 6 回生の hatsusato です。 修士 2 回生ともなると研究にかまけて KMC 活動がおろそかになっているので、この場を借りて申し訳程度に KMC 活動をしようと思います。

View .tmux.conf
set-option -s escape-time 0
set-option -g prefix C-z
set-option -g display-panes-time 600
set-option -g display-time 1200
set-window-option -g mode-keys emacs
## list-keys ##
bind-key C-b choose-window
View .gitconfig
[user]
email = knightspm5@gmail.com
name = hatsusato
[core]
editor = vim
[color]
ui = auto
[alias]
a = add
aa = add --update
View manip-gallery.cpp
View unmovable.hpp
template <typename T>
struct Unmovable {
protected:
Unmovable() = default;
~Unmovable() = default;
Unmovable(const Unmovable&) = default;
Unmovable& operator=(const Unmovable&) = default;
Unmovable(Unmovable&&) = delete;
Unmovable& operator=(Unmovable&&) = delete;
};
View uncopyable.hpp
template <typename T>
struct Uncopyable {
protected:
Uncopyable() = default;
~Uncopyable() = default;
Uncopyable(const Uncopyable&) = delete;
Uncopyable& operator=(const Uncopyable&) = delete;
Uncopyable(Uncopyable&&) = default;
Uncopyable& operator=(Uncopyable&&) = default;
};