Skip to content

Instantly share code, notes, and snippets.

:octocat:
may the --force be with you!

Mitama LoliGothick

:octocat:
may the --force be with you!
Block or report user

Report or block LoliGothick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docs_config.yml
version: 2.1
orbs: # Inline Orbs for Document Integration
mkdocs:
jobs:
test_book: # Sample Code Integration
parameters:
compiler:
description: compiler-version
type: string
View config.yml
version: 2.1
executors:
default:
docker:
- image: buildpack-deps:bionic-curl
test-env:
parameters:
compiler:
description: "compiler-version"
default: "clang-7.0.0"
View init.zsh
#!/usr/bin/env zsh
# A hash array for zplug
typeset -gx -A zplugs
zplugs=()
# A variable as a starting point of zplug
typeset -gx ZPLUG_ROOT="${${(%):-%N}:A:h}"
# Load basic functions such as an __zplug::base function
View hoge.hpp
template < class... Units1, template <class> class Synonym1, auto Value1,
class... Units2, template <class> class Synonym2, auto Value2,
std::enable_if_t<
is_same_dimensional_v<
dimensional_t<Units1...>,
dimensional_t<Units2...>>,
bool> = false >
inline constexpr auto
operator+ (static_quantity_t<Synonym1<dimensional_t<Units1...>>, Value1>, static_quantity_t<Synonym2<dimensional_t<Units2...>>, Value2>) noexcept
-> static_quantity_t<mitamagic::scaled_dimension_t<dimensional_t<Units1...>, dimensional_t<Units2...>>,
View unused_params
clang++ ./test.cpp -std=c++17 -Wall -Wextra -I../include
In file included from ./test.cpp:1:
In file included from ./../include/DTL.hpp:32:
In file included from ../include/DTL/Deprecated.hpp:43:
In file included from ../include/Deprecated/RogueLike.hpp:18:
../include/Utility/NoiseShoreBool.hpp:282:75: warning: unused parameter 'x_' [-Wunused-parameter]
constexpr void noiseShoreBothBool(Matrix_ & matrix_, const std::size_t x_, const std::size_t y_) noexcept {
^
../include/Utility/NoiseShoreBool.hpp:282:97: warning: unused parameter 'y_' [-Wunused-parameter]
constexpr void noiseShoreBothBool(Matrix_ & matrix_, const std::size_t x_, const std::size_t y_) noexcept {
View Dockerfile
FROM ubuntu
RUN set -x && \
apt-get update && \
apt-get install -y make cmake gcc g++ python libtool zlib1g zlib1g-dev subversion && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
cd / && \
mkdir llvm && \
cd /llvm && \
View .zshrc
# zplug
source ~/.zplug/init.zsh
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
# theme
zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme
# syntax highlighting (https://github.com/zsh-users/zsh-syntax-highlighting)
zplug "zsh-users/zsh-syntax-highlighting"
# history関係
zplug "zsh-users/zsh-history-substring-search"
# タイプ補完
View file0.txt
fn main() {
let mut scores = vec![1, 2, 3]; // --+ 'scope
let score = &scores[0]; // |
// ^~~~~~~~~~~~~~~~~~~~~ 'lifetime // |
println!("{}", score); // |
scores.push(4); // |
} // <-----------------------------------+
View emplace.cpp
#include <vector>
#include <tuple>
using namespace std;
int
main(){
vector< pair< std::string, int, int > > vec;
// 超ダサいし、読みにくいし、パフォーマンスも悪そうなコード
vec.push_back( make_tuple( "hoge", 1, 0 ) );
// コンストラクタに直接初期化子を完全転送して要素を構築
View lambda_z_combinator.cpp
#include <iostream>
int main() {
[](auto f){
return [=](auto x) {
return [=](auto ...y) {
return f(x(x), y...);
};
}([=](auto x) {
return [=](auto ...y) {
You can’t perform that action at this time.